From b7ef63400dd53bf2eed599b33a55a8fbd953b90f Mon Sep 17 00:00:00 2001 From: kingchenc Date: Tue, 9 Jun 2026 19:18:40 +0200 Subject: [PATCH] Add the R binding over the C ABI hub (#230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an R binding (`bindings/r`) over the C ABI hub — the third language stecker after C# and Go, reaching the hub through R's native `.Call` interface (not extendr). ## What's here - **`bindings/r`** — an R package exposing all 514 indicators as constructors that return a `wickra_indicator` object with generic `update`/`batch`/`reset` methods. The C glue (`src/wickra.c`) and R wrappers (`R/indicators.R`) are generated from `bindings/c/include/wickra.h` (same archetype taxonomy as the C#/Go generators: scalar/batch, multi-output, bars, profile, profile-values, array-input). The opaque handle is an R external pointer freed by a registered finalizer; multi-output returns a named vector (`NA` at warmup), bars a matrix, profiles a list. - **`examples/r`** — the full example suite mirroring C/C#/Go: streaming, backtest, multi_timeframe, parallel_assets (`mclapply`), three strategies, and `fetch_btcusdt`/`live_binance`. - **CI** — an `r` job builds the C ABI library, installs the package, runs the `testthat` suite and the offline examples on Linux, macOS and Windows (`R CMD check` is clean: 0 warnings, 0 notes). - **Docs** — R added to the README languages table, project layout, building/testing, CONTRIBUTING binding table + regenerate note, ARCHITECTURE, examples index, issue/PR templates, the About-description template, and the other binding READMEs. ## Linking / distribution The package compiles a thin `.Call` glue layer against the prebuilt C ABI library (header via `WICKRA_INCLUDE_DIR`, library via `WICKRA_LIB_DIR`). On Windows the package's own `wickra.dll` would collide with the C ABI's `wickra.dll`, so `configure.win` stages a renamed copy (`wickra_abi.dll`) and builds an import library referencing it; `install.libs.R` bundles the DLL and `.onLoad` puts it on the load path. On Linux/macOS the rpath locates the shared library. No `release.yml` change — R is distributed via r-universe / source install (gated). No Rust crate or `Cargo.toml` change — the R package is standalone and additive. --- .gitattributes | 8 + .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 1 + .../ISSUE_TEMPLATE/performance_regression.md | 2 +- .github/ISSUE_TEMPLATE/question.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/PULL_REQUEST_TEMPLATE/detailed.md | 1 + .github/workflows/ci.yml | 70 + .github/workflows/sync-about.yml | 2 +- ARCHITECTURE.md | 5 +- CHANGELOG.md | 7 + CONTRIBUTING.md | 5 +- README.md | 24 +- ROADMAP.md | 2 +- SUPPORT.md | 2 +- THREAT_MODEL.md | 2 +- bindings/c/README.md | 2 +- bindings/csharp/README.md | 2 +- bindings/node/README.md | 2 +- bindings/python/README.md | 2 +- bindings/r/.Rbuildignore | 8 + bindings/r/DESCRIPTION | 20 + bindings/r/LICENSE | 2 + bindings/r/NAMESPACE | 522 + bindings/r/R/indicators.R | 4121 ++++ bindings/r/R/methods.R | 78 + bindings/r/R/zzz.R | 18 + bindings/r/README.md | 85 + bindings/r/configure.win | 17 + bindings/r/man/AbandonedBaby.Rd | 12 + bindings/r/man/Abcd.Rd | 12 + bindings/r/man/AbsoluteBreadthIndex.Rd | 12 + bindings/r/man/AccelerationBands.Rd | 12 + bindings/r/man/AcceleratorOscillator.Rd | 12 + bindings/r/man/AdOscillator.Rd | 12 + bindings/r/man/AdVolumeLine.Rd | 12 + bindings/r/man/AdaptiveCci.Rd | 12 + bindings/r/man/AdaptiveCycle.Rd | 12 + bindings/r/man/AdaptiveLaguerreFilter.Rd | 12 + bindings/r/man/AdaptiveRsi.Rd | 12 + bindings/r/man/Adl.Rd | 12 + bindings/r/man/AdvanceBlock.Rd | 12 + bindings/r/man/AdvanceDecline.Rd | 12 + bindings/r/man/AdvanceDeclineRatio.Rd | 12 + bindings/r/man/Adx.Rd | 12 + bindings/r/man/Adxr.Rd | 12 + bindings/r/man/Alligator.Rd | 12 + bindings/r/man/Alma.Rd | 12 + bindings/r/man/Alpha.Rd | 12 + bindings/r/man/AmihudIlliquidity.Rd | 12 + bindings/r/man/AnchoredRsi.Rd | 12 + bindings/r/man/AnchoredVwap.Rd | 12 + bindings/r/man/AndrewsPitchfork.Rd | 12 + bindings/r/man/Apo.Rd | 12 + bindings/r/man/Aroon.Rd | 12 + bindings/r/man/AroonOscillator.Rd | 12 + bindings/r/man/Atr.Rd | 12 + bindings/r/man/AtrBands.Rd | 12 + bindings/r/man/AtrRatchet.Rd | 12 + bindings/r/man/AtrTrailingStop.Rd | 12 + bindings/r/man/AutoFib.Rd | 12 + bindings/r/man/Autocorrelation.Rd | 12 + bindings/r/man/AutocorrelationPeriodogram.Rd | 12 + bindings/r/man/AverageDailyRange.Rd | 12 + bindings/r/man/AverageDrawdown.Rd | 12 + bindings/r/man/AvgPrice.Rd | 12 + bindings/r/man/AwesomeOscillator.Rd | 12 + bindings/r/man/AwesomeOscillatorHistogram.Rd | 12 + bindings/r/man/BalanceOfPower.Rd | 12 + bindings/r/man/BandpassFilter.Rd | 12 + bindings/r/man/Bat.Rd | 12 + bindings/r/man/BeltHold.Rd | 12 + bindings/r/man/Beta.Rd | 12 + bindings/r/man/BetaNeutralSpread.Rd | 12 + bindings/r/man/BetterVolume.Rd | 12 + bindings/r/man/BipowerVariation.Rd | 12 + bindings/r/man/BodySizePct.Rd | 12 + bindings/r/man/BollingerBands.Rd | 12 + bindings/r/man/BollingerBandwidth.Rd | 12 + bindings/r/man/BomarBands.Rd | 12 + bindings/r/man/BreadthThrust.Rd | 12 + bindings/r/man/Breakaway.Rd | 12 + bindings/r/man/BullishPercentIndex.Rd | 12 + bindings/r/man/BurkeRatio.Rd | 12 + bindings/r/man/Butterfly.Rd | 12 + bindings/r/man/CalendarSpread.Rd | 12 + bindings/r/man/CalmarRatio.Rd | 12 + bindings/r/man/Camarilla.Rd | 12 + bindings/r/man/CandleVolume.Rd | 12 + bindings/r/man/Cci.Rd | 12 + bindings/r/man/CenterOfGravity.Rd | 12 + bindings/r/man/CentralPivotRange.Rd | 12 + bindings/r/man/Cfo.Rd | 12 + bindings/r/man/ChaikinMoneyFlow.Rd | 12 + bindings/r/man/ChaikinOscillator.Rd | 12 + bindings/r/man/ChaikinVolatility.Rd | 12 + bindings/r/man/ChandeKrollStop.Rd | 12 + bindings/r/man/ChandelierExit.Rd | 12 + bindings/r/man/ChoppinessIndex.Rd | 12 + bindings/r/man/ClassicPivots.Rd | 12 + bindings/r/man/CloseVsOpen.Rd | 12 + bindings/r/man/ClosingMarubozu.Rd | 12 + bindings/r/man/Cmo.Rd | 12 + bindings/r/man/CoefficientOfVariation.Rd | 12 + bindings/r/man/Cointegration.Rd | 12 + bindings/r/man/CommonSenseRatio.Rd | 12 + bindings/r/man/CompositeProfile.Rd | 12 + bindings/r/man/ConcealingBabySwallow.Rd | 12 + bindings/r/man/ConditionalValueAtRisk.Rd | 12 + bindings/r/man/ConnorsRsi.Rd | 12 + bindings/r/man/Coppock.Rd | 12 + bindings/r/man/CorrelationTrendIndicator.Rd | 12 + bindings/r/man/Counterattack.Rd | 12 + bindings/r/man/Crab.Rd | 12 + bindings/r/man/CumulativeVolumeDelta.Rd | 12 + bindings/r/man/CumulativeVolumeIndex.Rd | 12 + bindings/r/man/CupAndHandle.Rd | 12 + bindings/r/man/CyberneticCycle.Rd | 12 + bindings/r/man/Cypher.Rd | 12 + bindings/r/man/DayOfWeekProfile.Rd | 12 + bindings/r/man/Decycler.Rd | 12 + bindings/r/man/DecyclerOscillator.Rd | 12 + bindings/r/man/Dema.Rd | 12 + bindings/r/man/DemandIndex.Rd | 12 + bindings/r/man/DemarkPivots.Rd | 12 + bindings/r/man/DepthSlope.Rd | 12 + bindings/r/man/DerivativeOscillator.Rd | 12 + bindings/r/man/DetrendedStdDev.Rd | 12 + bindings/r/man/DisparityIndex.Rd | 12 + bindings/r/man/DistanceSsd.Rd | 12 + bindings/r/man/Doji.Rd | 12 + bindings/r/man/DojiStar.Rd | 12 + bindings/r/man/DollarBars.Rd | 12 + bindings/r/man/Donchian.Rd | 12 + bindings/r/man/DonchianStop.Rd | 12 + bindings/r/man/DoubleBollinger.Rd | 12 + bindings/r/man/DoubleTopBottom.Rd | 12 + bindings/r/man/DownsideGapThreeMethods.Rd | 12 + bindings/r/man/Dpo.Rd | 12 + bindings/r/man/DragonflyDoji.Rd | 12 + bindings/r/man/DrawdownDuration.Rd | 12 + bindings/r/man/DumplingTop.Rd | 12 + bindings/r/man/Dx.Rd | 12 + bindings/r/man/DynamicMomentumIndex.Rd | 12 + bindings/r/man/EaseOfMovement.Rd | 12 + bindings/r/man/EffectiveSpread.Rd | 12 + bindings/r/man/EhlersStochastic.Rd | 12 + bindings/r/man/Ehma.Rd | 12 + bindings/r/man/ElderImpulse.Rd | 12 + bindings/r/man/ElderRay.Rd | 12 + bindings/r/man/ElderSafeZone.Rd | 12 + bindings/r/man/Ema.Rd | 12 + bindings/r/man/EmpiricalModeDecomposition.Rd | 12 + bindings/r/man/Engulfing.Rd | 12 + bindings/r/man/Equivolume.Rd | 12 + bindings/r/man/EstimatedLeverageRatio.Rd | 12 + bindings/r/man/EvenBetterSinewave.Rd | 12 + bindings/r/man/EveningDojiStar.Rd | 12 + bindings/r/man/Evwma.Rd | 12 + bindings/r/man/EwmaVolatility.Rd | 12 + bindings/r/man/Expectancy.Rd | 12 + bindings/r/man/FallingThreeMethods.Rd | 12 + bindings/r/man/Fama.Rd | 12 + bindings/r/man/FibArcs.Rd | 12 + bindings/r/man/FibChannel.Rd | 12 + bindings/r/man/FibConfluence.Rd | 12 + bindings/r/man/FibExtension.Rd | 12 + bindings/r/man/FibFan.Rd | 12 + bindings/r/man/FibProjection.Rd | 12 + bindings/r/man/FibRetracement.Rd | 12 + bindings/r/man/FibTimeZones.Rd | 12 + bindings/r/man/FibonacciPivots.Rd | 12 + bindings/r/man/FisherRsi.Rd | 12 + bindings/r/man/FisherTransform.Rd | 12 + bindings/r/man/FlagPennant.Rd | 12 + bindings/r/man/Footprint.Rd | 12 + bindings/r/man/ForceIndex.Rd | 12 + bindings/r/man/FractalChaosBands.Rd | 12 + bindings/r/man/Frama.Rd | 12 + bindings/r/man/FryPanBottom.Rd | 12 + bindings/r/man/FundingBasis.Rd | 12 + bindings/r/man/FundingImpliedApr.Rd | 12 + bindings/r/man/FundingRate.Rd | 12 + bindings/r/man/FundingRateMean.Rd | 12 + bindings/r/man/FundingRateZScore.Rd | 12 + bindings/r/man/GainLossRatio.Rd | 12 + bindings/r/man/GainToPainRatio.Rd | 12 + bindings/r/man/GapSideBySideWhite.Rd | 12 + bindings/r/man/Garch11.Rd | 12 + bindings/r/man/GarmanKlassVolatility.Rd | 12 + bindings/r/man/Gartley.Rd | 12 + bindings/r/man/GatorOscillator.Rd | 12 + bindings/r/man/GeneralizedDema.Rd | 12 + bindings/r/man/GeometricMa.Rd | 12 + bindings/r/man/GoldenPocket.Rd | 12 + bindings/r/man/GrangerCausality.Rd | 12 + bindings/r/man/GravestoneDoji.Rd | 12 + bindings/r/man/Hammer.Rd | 12 + bindings/r/man/HangingMan.Rd | 12 + bindings/r/man/Harami.Rd | 12 + bindings/r/man/HaramiCross.Rd | 12 + bindings/r/man/HasbrouckInformationShare.Rd | 12 + bindings/r/man/HeadAndShoulders.Rd | 12 + bindings/r/man/HeikinAshi.Rd | 12 + bindings/r/man/HeikinAshiOscillator.Rd | 12 + bindings/r/man/HiLoActivator.Rd | 12 + bindings/r/man/HighLowIndex.Rd | 12 + bindings/r/man/HighLowRange.Rd | 12 + bindings/r/man/HighLowVolumeNodes.Rd | 12 + bindings/r/man/HighWave.Rd | 12 + bindings/r/man/HighpassFilter.Rd | 12 + bindings/r/man/Hikkake.Rd | 12 + bindings/r/man/HikkakeModified.Rd | 12 + bindings/r/man/HilbertDominantCycle.Rd | 12 + bindings/r/man/HistoricalVolatility.Rd | 12 + bindings/r/man/Hma.Rd | 12 + bindings/r/man/HoltWinters.Rd | 12 + bindings/r/man/HomingPigeon.Rd | 12 + bindings/r/man/HtDcPhase.Rd | 12 + bindings/r/man/HtPhasor.Rd | 12 + bindings/r/man/HtTrendMode.Rd | 12 + bindings/r/man/HurstChannel.Rd | 12 + bindings/r/man/HurstExponent.Rd | 12 + bindings/r/man/Ichimoku.Rd | 12 + bindings/r/man/IdenticalThreeCrows.Rd | 12 + bindings/r/man/ImbalanceBars.Rd | 12 + bindings/r/man/InNeck.Rd | 12 + bindings/r/man/Inertia.Rd | 12 + bindings/r/man/InformationRatio.Rd | 12 + bindings/r/man/InitialBalance.Rd | 12 + bindings/r/man/InstantaneousTrendline.Rd | 12 + bindings/r/man/IntradayIntensity.Rd | 12 + bindings/r/man/IntradayMomentumIndex.Rd | 12 + bindings/r/man/IntradayVolatilityProfile.Rd | 12 + bindings/r/man/InverseFisherTransform.Rd | 12 + bindings/r/man/InvertedHammer.Rd | 12 + bindings/r/man/JarqueBera.Rd | 12 + bindings/r/man/Jma.Rd | 12 + bindings/r/man/JumpIndicator.Rd | 12 + bindings/r/man/KRatio.Rd | 12 + bindings/r/man/KagiBars.Rd | 12 + bindings/r/man/KalmanHedgeRatio.Rd | 12 + bindings/r/man/Kama.Rd | 12 + bindings/r/man/KaseDevStop.Rd | 12 + bindings/r/man/KasePermissionStochastic.Rd | 12 + bindings/r/man/KellyCriterion.Rd | 12 + bindings/r/man/Keltner.Rd | 12 + bindings/r/man/KendallTau.Rd | 12 + bindings/r/man/Kicking.Rd | 12 + bindings/r/man/KickingByLength.Rd | 12 + bindings/r/man/Kst.Rd | 12 + bindings/r/man/Kurtosis.Rd | 12 + bindings/r/man/Kvo.Rd | 12 + bindings/r/man/KylesLambda.Rd | 12 + bindings/r/man/LadderBottom.Rd | 12 + bindings/r/man/LaguerreRsi.Rd | 12 + bindings/r/man/LeadLagCrossCorrelation.Rd | 12 + bindings/r/man/LinRegAngle.Rd | 12 + bindings/r/man/LinRegChannel.Rd | 12 + bindings/r/man/LinRegIntercept.Rd | 12 + bindings/r/man/LinRegSlope.Rd | 12 + bindings/r/man/LinearRegression.Rd | 12 + bindings/r/man/LiquidationFeatures.Rd | 12 + bindings/r/man/LogReturn.Rd | 12 + bindings/r/man/LongLeggedDoji.Rd | 12 + bindings/r/man/LongLine.Rd | 12 + bindings/r/man/LongShortRatio.Rd | 12 + bindings/r/man/M2Measure.Rd | 12 + bindings/r/man/MaEnvelope.Rd | 12 + bindings/r/man/MacdExt.Rd | 12 + bindings/r/man/MacdFix.Rd | 12 + bindings/r/man/MacdHistogram.Rd | 12 + bindings/r/man/MacdIndicator.Rd | 12 + bindings/r/man/Mama.Rd | 12 + bindings/r/man/MarketFacilitationIndex.Rd | 12 + bindings/r/man/MartinRatio.Rd | 12 + bindings/r/man/Marubozu.Rd | 12 + bindings/r/man/MassIndex.Rd | 12 + bindings/r/man/MatHold.Rd | 12 + bindings/r/man/MatchingLow.Rd | 12 + bindings/r/man/MaxDrawdown.Rd | 12 + bindings/r/man/McClellanOscillator.Rd | 12 + bindings/r/man/McClellanSummationIndex.Rd | 12 + bindings/r/man/McGinleyDynamic.Rd | 12 + bindings/r/man/MedianAbsoluteDeviation.Rd | 12 + bindings/r/man/MedianChannel.Rd | 12 + bindings/r/man/MedianMa.Rd | 12 + bindings/r/man/MedianPrice.Rd | 12 + bindings/r/man/Mfi.Rd | 12 + bindings/r/man/Microprice.Rd | 12 + bindings/r/man/MidPoint.Rd | 12 + bindings/r/man/MidPrice.Rd | 12 + bindings/r/man/MinusDi.Rd | 12 + bindings/r/man/MinusDm.Rd | 12 + bindings/r/man/ModifiedMaStop.Rd | 12 + bindings/r/man/Mom.Rd | 12 + bindings/r/man/MorningDojiStar.Rd | 12 + bindings/r/man/MorningEveningStar.Rd | 12 + bindings/r/man/MurreyMathLines.Rd | 12 + bindings/r/man/NakedPoc.Rd | 12 + bindings/r/man/Natr.Rd | 12 + bindings/r/man/NewHighsNewLows.Rd | 12 + bindings/r/man/NewPriceLines.Rd | 12 + bindings/r/man/Nrtr.Rd | 12 + bindings/r/man/Nvi.Rd | 12 + bindings/r/man/OIPriceDivergence.Rd | 12 + bindings/r/man/OIWeighted.Rd | 12 + bindings/r/man/Obv.Rd | 12 + bindings/r/man/OiToVolumeRatio.Rd | 12 + bindings/r/man/OmegaRatio.Rd | 12 + bindings/r/man/OnNeck.Rd | 12 + bindings/r/man/OpenInterestDelta.Rd | 12 + bindings/r/man/OpenInterestMomentum.Rd | 12 + bindings/r/man/OpeningMarubozu.Rd | 12 + bindings/r/man/OpeningRange.Rd | 12 + bindings/r/man/OrderBookImbalanceFull.Rd | 12 + bindings/r/man/OrderBookImbalanceTop1.Rd | 12 + bindings/r/man/OrderBookImbalanceTopN.Rd | 12 + bindings/r/man/OrderFlowImbalance.Rd | 12 + bindings/r/man/OuHalfLife.Rd | 12 + bindings/r/man/OvernightGap.Rd | 12 + bindings/r/man/OvernightIntradayReturn.Rd | 12 + bindings/r/man/PainIndex.Rd | 12 + bindings/r/man/PairSpreadZScore.Rd | 12 + bindings/r/man/PairwiseBeta.Rd | 12 + bindings/r/man/ParkinsonVolatility.Rd | 12 + bindings/r/man/PearsonCorrelation.Rd | 12 + bindings/r/man/PercentAboveMa.Rd | 12 + bindings/r/man/PercentB.Rd | 12 + bindings/r/man/PercentageTrailingStop.Rd | 12 + bindings/r/man/PerpetualPremiumIndex.Rd | 12 + bindings/r/man/Pgo.Rd | 12 + bindings/r/man/PiercingDarkCloud.Rd | 12 + bindings/r/man/Pin.Rd | 12 + bindings/r/man/PivotReversal.Rd | 12 + bindings/r/man/PlusDi.Rd | 12 + bindings/r/man/PlusDm.Rd | 12 + bindings/r/man/Pmo.Rd | 12 + bindings/r/man/PointAndFigureBars.Rd | 12 + bindings/r/man/PolarizedFractalEfficiency.Rd | 12 + bindings/r/man/Ppo.Rd | 12 + bindings/r/man/PpoHistogram.Rd | 12 + bindings/r/man/ProfileShape.Rd | 12 + bindings/r/man/ProfitFactor.Rd | 12 + bindings/r/man/ProjectionBands.Rd | 12 + bindings/r/man/ProjectionOscillator.Rd | 12 + bindings/r/man/Psar.Rd | 12 + bindings/r/man/Pvi.Rd | 12 + bindings/r/man/Qqe.Rd | 12 + bindings/r/man/Qstick.Rd | 12 + bindings/r/man/QuartileBands.Rd | 12 + bindings/r/man/QuotedSpread.Rd | 12 + bindings/r/man/RSquared.Rd | 12 + bindings/r/man/RangeBars.Rd | 12 + bindings/r/man/RealizedSpread.Rd | 12 + bindings/r/man/RealizedVolatility.Rd | 12 + bindings/r/man/RecoveryFactor.Rd | 12 + bindings/r/man/RectangleRange.Rd | 12 + bindings/r/man/Reflex.Rd | 12 + bindings/r/man/RegimeLabel.Rd | 12 + bindings/r/man/RelativeStrengthAB.Rd | 12 + bindings/r/man/RenkoBars.Rd | 12 + bindings/r/man/RenkoTrailingStop.Rd | 12 + bindings/r/man/RickshawMan.Rd | 12 + bindings/r/man/RisingThreeMethods.Rd | 12 + bindings/r/man/Rmi.Rd | 12 + bindings/r/man/Roc.Rd | 12 + bindings/r/man/Rocp.Rd | 12 + bindings/r/man/Rocr.Rd | 12 + bindings/r/man/Rocr100.Rd | 12 + bindings/r/man/RogersSatchellVolatility.Rd | 12 + bindings/r/man/RollMeasure.Rd | 12 + bindings/r/man/RollingCorrelation.Rd | 12 + bindings/r/man/RollingCovariance.Rd | 12 + bindings/r/man/RollingIqr.Rd | 12 + bindings/r/man/RollingMinMaxScaler.Rd | 12 + bindings/r/man/RollingPercentileRank.Rd | 12 + bindings/r/man/RollingQuantile.Rd | 12 + bindings/r/man/RollingVwap.Rd | 12 + bindings/r/man/RoofingFilter.Rd | 12 + bindings/r/man/Rsi.Rd | 12 + bindings/r/man/Rsx.Rd | 12 + bindings/r/man/RunBars.Rd | 12 + bindings/r/man/Rvi.Rd | 12 + bindings/r/man/RviVolatility.Rd | 12 + bindings/r/man/Rwi.Rd | 12 + bindings/r/man/SampleEntropy.Rd | 12 + bindings/r/man/SarExt.Rd | 21 + bindings/r/man/SeasonalZScore.Rd | 12 + bindings/r/man/SeparatingLines.Rd | 12 + bindings/r/man/SessionHighLow.Rd | 12 + bindings/r/man/SessionRange.Rd | 12 + bindings/r/man/SessionVwap.Rd | 12 + bindings/r/man/ShannonEntropy.Rd | 12 + bindings/r/man/Shark.Rd | 12 + bindings/r/man/SharpeRatio.Rd | 12 + bindings/r/man/ShootingStar.Rd | 12 + bindings/r/man/ShortLine.Rd | 12 + bindings/r/man/SignedVolume.Rd | 12 + bindings/r/man/SineWave.Rd | 12 + bindings/r/man/SineWeightedMa.Rd | 12 + bindings/r/man/SinglePrints.Rd | 12 + bindings/r/man/Skewness.Rd | 12 + bindings/r/man/Sma.Rd | 12 + bindings/r/man/Smi.Rd | 12 + bindings/r/man/Smma.Rd | 12 + bindings/r/man/SmoothedHeikinAshi.Rd | 12 + bindings/r/man/SortinoRatio.Rd | 12 + bindings/r/man/SpearmanCorrelation.Rd | 12 + bindings/r/man/SpinningTop.Rd | 12 + bindings/r/man/SpreadAr1Coefficient.Rd | 12 + bindings/r/man/SpreadBollingerBands.Rd | 12 + bindings/r/man/SpreadHurst.Rd | 12 + bindings/r/man/StalledPattern.Rd | 12 + bindings/r/man/StandardError.Rd | 12 + bindings/r/man/StandardErrorBands.Rd | 12 + bindings/r/man/StarcBands.Rd | 12 + bindings/r/man/Stc.Rd | 12 + bindings/r/man/StdDev.Rd | 12 + bindings/r/man/StepTrailingStop.Rd | 12 + bindings/r/man/SterlingRatio.Rd | 12 + bindings/r/man/StickSandwich.Rd | 12 + bindings/r/man/StochRsi.Rd | 12 + bindings/r/man/Stochastic.Rd | 12 + bindings/r/man/StochasticCci.Rd | 12 + bindings/r/man/SuperSmoother.Rd | 12 + bindings/r/man/SuperTrend.Rd | 12 + bindings/r/man/T3.Rd | 12 + bindings/r/man/TailRatio.Rd | 12 + bindings/r/man/TakerBuySellRatio.Rd | 12 + bindings/r/man/Takuri.Rd | 12 + bindings/r/man/TasukiGap.Rd | 12 + bindings/r/man/TdCamouflage.Rd | 12 + bindings/r/man/TdClop.Rd | 12 + bindings/r/man/TdClopwin.Rd | 12 + bindings/r/man/TdCombo.Rd | 12 + bindings/r/man/TdCountdown.Rd | 12 + bindings/r/man/TdDWave.Rd | 12 + bindings/r/man/TdDeMarker.Rd | 12 + bindings/r/man/TdDifferential.Rd | 12 + bindings/r/man/TdLines.Rd | 12 + bindings/r/man/TdMovingAverage.Rd | 12 + bindings/r/man/TdOpen.Rd | 12 + bindings/r/man/TdPressure.Rd | 12 + bindings/r/man/TdPropulsion.Rd | 12 + bindings/r/man/TdRangeProjection.Rd | 12 + bindings/r/man/TdRei.Rd | 12 + bindings/r/man/TdRiskLevel.Rd | 12 + bindings/r/man/TdSequential.Rd | 17 + bindings/r/man/TdSetup.Rd | 12 + bindings/r/man/TdTrap.Rd | 12 + bindings/r/man/Tema.Rd | 12 + bindings/r/man/TermStructureBasis.Rd | 12 + bindings/r/man/ThreeDrives.Rd | 12 + bindings/r/man/ThreeInside.Rd | 12 + bindings/r/man/ThreeLineBreak.Rd | 12 + bindings/r/man/ThreeLineBreakBars.Rd | 12 + bindings/r/man/ThreeLineStrike.Rd | 12 + bindings/r/man/ThreeOutside.Rd | 12 + bindings/r/man/ThreeSoldiersOrCrows.Rd | 12 + bindings/r/man/ThreeStarsInSouth.Rd | 12 + bindings/r/man/Thrusting.Rd | 12 + bindings/r/man/TickBars.Rd | 12 + bindings/r/man/TickIndex.Rd | 12 + bindings/r/man/Tii.Rd | 12 + bindings/r/man/TimeBasedStop.Rd | 12 + bindings/r/man/TimeOfDayReturnProfile.Rd | 12 + bindings/r/man/TowerTopBottom.Rd | 12 + bindings/r/man/TpoProfile.Rd | 12 + bindings/r/man/TradeImbalance.Rd | 12 + bindings/r/man/TradeSignAutocorrelation.Rd | 12 + bindings/r/man/TradeVolumeIndex.Rd | 12 + bindings/r/man/TrendLabel.Rd | 12 + bindings/r/man/TrendStrengthIndex.Rd | 12 + bindings/r/man/Trendflex.Rd | 12 + bindings/r/man/TreynorRatio.Rd | 12 + bindings/r/man/Triangle.Rd | 12 + bindings/r/man/Trima.Rd | 12 + bindings/r/man/Trin.Rd | 12 + bindings/r/man/TripleTopBottom.Rd | 12 + bindings/r/man/Tristar.Rd | 12 + bindings/r/man/Trix.Rd | 12 + bindings/r/man/TrueRange.Rd | 12 + bindings/r/man/Tsf.Rd | 12 + bindings/r/man/TsfOscillator.Rd | 12 + bindings/r/man/Tsi.Rd | 12 + bindings/r/man/Tsv.Rd | 12 + bindings/r/man/TtmSqueeze.Rd | 12 + bindings/r/man/TtmTrend.Rd | 12 + bindings/r/man/TurnOfMonth.Rd | 12 + bindings/r/man/Tweezer.Rd | 12 + bindings/r/man/TwiggsMoneyFlow.Rd | 12 + bindings/r/man/TwoCrows.Rd | 12 + bindings/r/man/TypicalPrice.Rd | 12 + bindings/r/man/UlcerIndex.Rd | 12 + bindings/r/man/UltimateOscillator.Rd | 12 + bindings/r/man/UniqueThreeRiver.Rd | 12 + bindings/r/man/UniversalOscillator.Rd | 12 + bindings/r/man/UpDownVolumeRatio.Rd | 12 + bindings/r/man/UpsideGapThreeMethods.Rd | 12 + bindings/r/man/UpsideGapTwoCrows.Rd | 12 + bindings/r/man/UpsidePotentialRatio.Rd | 12 + bindings/r/man/ValueArea.Rd | 12 + bindings/r/man/ValueAtRisk.Rd | 12 + bindings/r/man/Variance.Rd | 12 + bindings/r/man/VarianceRatio.Rd | 12 + bindings/r/man/VerticalHorizontalFilter.Rd | 12 + bindings/r/man/Vidya.Rd | 12 + bindings/r/man/VolatilityCone.Rd | 12 + bindings/r/man/VolatilityOfVolatility.Rd | 12 + bindings/r/man/VolatilityRatio.Rd | 12 + bindings/r/man/VoltyStop.Rd | 12 + bindings/r/man/VolumeBars.Rd | 12 + bindings/r/man/VolumeByTimeProfile.Rd | 12 + bindings/r/man/VolumeOscillator.Rd | 12 + bindings/r/man/VolumePriceTrend.Rd | 12 + bindings/r/man/VolumeProfile.Rd | 12 + bindings/r/man/VolumeRsi.Rd | 12 + bindings/r/man/VolumeWeightedMacd.Rd | 12 + bindings/r/man/VolumeWeightedSr.Rd | 12 + bindings/r/man/Vortex.Rd | 12 + bindings/r/man/Vpin.Rd | 12 + bindings/r/man/Vwap.Rd | 12 + bindings/r/man/VwapStdDevBands.Rd | 12 + bindings/r/man/Vwma.Rd | 12 + bindings/r/man/Vzo.Rd | 12 + bindings/r/man/Wad.Rd | 12 + bindings/r/man/WavePm.Rd | 12 + bindings/r/man/WaveTrend.Rd | 12 + bindings/r/man/Wedge.Rd | 12 + bindings/r/man/WeightedClose.Rd | 12 + bindings/r/man/WickRatio.Rd | 12 + bindings/r/man/WilliamsFractals.Rd | 12 + bindings/r/man/WilliamsR.Rd | 12 + bindings/r/man/WinRate.Rd | 12 + bindings/r/man/Wma.Rd | 12 + bindings/r/man/WoodiePivots.Rd | 12 + bindings/r/man/YangZhangVolatility.Rd | 12 + bindings/r/man/YoyoExit.Rd | 12 + bindings/r/man/ZScore.Rd | 12 + bindings/r/man/ZeroLagMacd.Rd | 12 + bindings/r/man/ZigZag.Rd | 12 + bindings/r/man/Zlema.Rd | 12 + bindings/r/man/batch.Rd | 26 + bindings/r/man/reset.Rd | 25 + bindings/r/man/update.wickra_indicator.Rd | 29 + bindings/r/man/wickra-package.Rd | 34 + bindings/r/src/.gitignore | 7 + bindings/r/src/Makevars | 5 + bindings/r/src/Makevars.win | 5 + bindings/r/src/install.libs.R | 10 + bindings/r/src/wickra.c | 18342 ++++++++++++++++ bindings/r/tests/testthat.R | 4 + bindings/r/tests/testthat/test-archetypes.R | 62 + bindings/wasm/README.md | 2 +- docs/README.md | 5 +- examples/README.md | 22 + examples/r/.gitignore | 3 + examples/r/README.md | 33 + examples/r/_common.R | 54 + examples/r/backtest.R | 28 + examples/r/fetch_btcusdt.R | 13 + examples/r/live_binance.R | 17 + examples/r/multi_timeframe.R | 23 + examples/r/parallel_assets.R | 24 + examples/r/strategy_bollinger_squeeze.R | 24 + examples/r/strategy_macd_adx.R | 24 + examples/r/strategy_rsi_mean_reversion.R | 20 + examples/r/streaming.R | 22 + 569 files changed, 30036 insertions(+), 25 deletions(-) create mode 100644 bindings/r/.Rbuildignore create mode 100644 bindings/r/DESCRIPTION create mode 100644 bindings/r/LICENSE create mode 100644 bindings/r/NAMESPACE create mode 100644 bindings/r/R/indicators.R create mode 100644 bindings/r/R/methods.R create mode 100644 bindings/r/R/zzz.R create mode 100644 bindings/r/README.md create mode 100644 bindings/r/configure.win create mode 100644 bindings/r/man/AbandonedBaby.Rd create mode 100644 bindings/r/man/Abcd.Rd create mode 100644 bindings/r/man/AbsoluteBreadthIndex.Rd create mode 100644 bindings/r/man/AccelerationBands.Rd create mode 100644 bindings/r/man/AcceleratorOscillator.Rd create mode 100644 bindings/r/man/AdOscillator.Rd create mode 100644 bindings/r/man/AdVolumeLine.Rd create mode 100644 bindings/r/man/AdaptiveCci.Rd create mode 100644 bindings/r/man/AdaptiveCycle.Rd create mode 100644 bindings/r/man/AdaptiveLaguerreFilter.Rd create mode 100644 bindings/r/man/AdaptiveRsi.Rd create mode 100644 bindings/r/man/Adl.Rd create mode 100644 bindings/r/man/AdvanceBlock.Rd create mode 100644 bindings/r/man/AdvanceDecline.Rd create mode 100644 bindings/r/man/AdvanceDeclineRatio.Rd create mode 100644 bindings/r/man/Adx.Rd create mode 100644 bindings/r/man/Adxr.Rd create mode 100644 bindings/r/man/Alligator.Rd create mode 100644 bindings/r/man/Alma.Rd create mode 100644 bindings/r/man/Alpha.Rd create mode 100644 bindings/r/man/AmihudIlliquidity.Rd create mode 100644 bindings/r/man/AnchoredRsi.Rd create mode 100644 bindings/r/man/AnchoredVwap.Rd create mode 100644 bindings/r/man/AndrewsPitchfork.Rd create mode 100644 bindings/r/man/Apo.Rd create mode 100644 bindings/r/man/Aroon.Rd create mode 100644 bindings/r/man/AroonOscillator.Rd create mode 100644 bindings/r/man/Atr.Rd create mode 100644 bindings/r/man/AtrBands.Rd create mode 100644 bindings/r/man/AtrRatchet.Rd create mode 100644 bindings/r/man/AtrTrailingStop.Rd create mode 100644 bindings/r/man/AutoFib.Rd create mode 100644 bindings/r/man/Autocorrelation.Rd create mode 100644 bindings/r/man/AutocorrelationPeriodogram.Rd create mode 100644 bindings/r/man/AverageDailyRange.Rd create mode 100644 bindings/r/man/AverageDrawdown.Rd create mode 100644 bindings/r/man/AvgPrice.Rd create mode 100644 bindings/r/man/AwesomeOscillator.Rd create mode 100644 bindings/r/man/AwesomeOscillatorHistogram.Rd create mode 100644 bindings/r/man/BalanceOfPower.Rd create mode 100644 bindings/r/man/BandpassFilter.Rd create mode 100644 bindings/r/man/Bat.Rd create mode 100644 bindings/r/man/BeltHold.Rd create mode 100644 bindings/r/man/Beta.Rd create mode 100644 bindings/r/man/BetaNeutralSpread.Rd create mode 100644 bindings/r/man/BetterVolume.Rd create mode 100644 bindings/r/man/BipowerVariation.Rd create mode 100644 bindings/r/man/BodySizePct.Rd create mode 100644 bindings/r/man/BollingerBands.Rd create mode 100644 bindings/r/man/BollingerBandwidth.Rd create mode 100644 bindings/r/man/BomarBands.Rd create mode 100644 bindings/r/man/BreadthThrust.Rd create mode 100644 bindings/r/man/Breakaway.Rd create mode 100644 bindings/r/man/BullishPercentIndex.Rd create mode 100644 bindings/r/man/BurkeRatio.Rd create mode 100644 bindings/r/man/Butterfly.Rd create mode 100644 bindings/r/man/CalendarSpread.Rd create mode 100644 bindings/r/man/CalmarRatio.Rd create mode 100644 bindings/r/man/Camarilla.Rd create mode 100644 bindings/r/man/CandleVolume.Rd create mode 100644 bindings/r/man/Cci.Rd create mode 100644 bindings/r/man/CenterOfGravity.Rd create mode 100644 bindings/r/man/CentralPivotRange.Rd create mode 100644 bindings/r/man/Cfo.Rd create mode 100644 bindings/r/man/ChaikinMoneyFlow.Rd create mode 100644 bindings/r/man/ChaikinOscillator.Rd create mode 100644 bindings/r/man/ChaikinVolatility.Rd create mode 100644 bindings/r/man/ChandeKrollStop.Rd create mode 100644 bindings/r/man/ChandelierExit.Rd create mode 100644 bindings/r/man/ChoppinessIndex.Rd create mode 100644 bindings/r/man/ClassicPivots.Rd create mode 100644 bindings/r/man/CloseVsOpen.Rd create mode 100644 bindings/r/man/ClosingMarubozu.Rd create mode 100644 bindings/r/man/Cmo.Rd create mode 100644 bindings/r/man/CoefficientOfVariation.Rd create mode 100644 bindings/r/man/Cointegration.Rd create mode 100644 bindings/r/man/CommonSenseRatio.Rd create mode 100644 bindings/r/man/CompositeProfile.Rd create mode 100644 bindings/r/man/ConcealingBabySwallow.Rd create mode 100644 bindings/r/man/ConditionalValueAtRisk.Rd create mode 100644 bindings/r/man/ConnorsRsi.Rd create mode 100644 bindings/r/man/Coppock.Rd create mode 100644 bindings/r/man/CorrelationTrendIndicator.Rd create mode 100644 bindings/r/man/Counterattack.Rd create mode 100644 bindings/r/man/Crab.Rd create mode 100644 bindings/r/man/CumulativeVolumeDelta.Rd create mode 100644 bindings/r/man/CumulativeVolumeIndex.Rd create mode 100644 bindings/r/man/CupAndHandle.Rd create mode 100644 bindings/r/man/CyberneticCycle.Rd create mode 100644 bindings/r/man/Cypher.Rd create mode 100644 bindings/r/man/DayOfWeekProfile.Rd create mode 100644 bindings/r/man/Decycler.Rd create mode 100644 bindings/r/man/DecyclerOscillator.Rd create mode 100644 bindings/r/man/Dema.Rd create mode 100644 bindings/r/man/DemandIndex.Rd create mode 100644 bindings/r/man/DemarkPivots.Rd create mode 100644 bindings/r/man/DepthSlope.Rd create mode 100644 bindings/r/man/DerivativeOscillator.Rd create mode 100644 bindings/r/man/DetrendedStdDev.Rd create mode 100644 bindings/r/man/DisparityIndex.Rd create mode 100644 bindings/r/man/DistanceSsd.Rd create mode 100644 bindings/r/man/Doji.Rd create mode 100644 bindings/r/man/DojiStar.Rd create mode 100644 bindings/r/man/DollarBars.Rd create mode 100644 bindings/r/man/Donchian.Rd create mode 100644 bindings/r/man/DonchianStop.Rd create mode 100644 bindings/r/man/DoubleBollinger.Rd create mode 100644 bindings/r/man/DoubleTopBottom.Rd create mode 100644 bindings/r/man/DownsideGapThreeMethods.Rd create mode 100644 bindings/r/man/Dpo.Rd create mode 100644 bindings/r/man/DragonflyDoji.Rd create mode 100644 bindings/r/man/DrawdownDuration.Rd create mode 100644 bindings/r/man/DumplingTop.Rd create mode 100644 bindings/r/man/Dx.Rd create mode 100644 bindings/r/man/DynamicMomentumIndex.Rd create mode 100644 bindings/r/man/EaseOfMovement.Rd create mode 100644 bindings/r/man/EffectiveSpread.Rd create mode 100644 bindings/r/man/EhlersStochastic.Rd create mode 100644 bindings/r/man/Ehma.Rd create mode 100644 bindings/r/man/ElderImpulse.Rd create mode 100644 bindings/r/man/ElderRay.Rd create mode 100644 bindings/r/man/ElderSafeZone.Rd create mode 100644 bindings/r/man/Ema.Rd create mode 100644 bindings/r/man/EmpiricalModeDecomposition.Rd create mode 100644 bindings/r/man/Engulfing.Rd create mode 100644 bindings/r/man/Equivolume.Rd create mode 100644 bindings/r/man/EstimatedLeverageRatio.Rd create mode 100644 bindings/r/man/EvenBetterSinewave.Rd create mode 100644 bindings/r/man/EveningDojiStar.Rd create mode 100644 bindings/r/man/Evwma.Rd create mode 100644 bindings/r/man/EwmaVolatility.Rd create mode 100644 bindings/r/man/Expectancy.Rd create mode 100644 bindings/r/man/FallingThreeMethods.Rd create mode 100644 bindings/r/man/Fama.Rd create mode 100644 bindings/r/man/FibArcs.Rd create mode 100644 bindings/r/man/FibChannel.Rd create mode 100644 bindings/r/man/FibConfluence.Rd create mode 100644 bindings/r/man/FibExtension.Rd create mode 100644 bindings/r/man/FibFan.Rd create mode 100644 bindings/r/man/FibProjection.Rd create mode 100644 bindings/r/man/FibRetracement.Rd create mode 100644 bindings/r/man/FibTimeZones.Rd create mode 100644 bindings/r/man/FibonacciPivots.Rd create mode 100644 bindings/r/man/FisherRsi.Rd create mode 100644 bindings/r/man/FisherTransform.Rd create mode 100644 bindings/r/man/FlagPennant.Rd create mode 100644 bindings/r/man/Footprint.Rd create mode 100644 bindings/r/man/ForceIndex.Rd create mode 100644 bindings/r/man/FractalChaosBands.Rd create mode 100644 bindings/r/man/Frama.Rd create mode 100644 bindings/r/man/FryPanBottom.Rd create mode 100644 bindings/r/man/FundingBasis.Rd create mode 100644 bindings/r/man/FundingImpliedApr.Rd create mode 100644 bindings/r/man/FundingRate.Rd create mode 100644 bindings/r/man/FundingRateMean.Rd create mode 100644 bindings/r/man/FundingRateZScore.Rd create mode 100644 bindings/r/man/GainLossRatio.Rd create mode 100644 bindings/r/man/GainToPainRatio.Rd create mode 100644 bindings/r/man/GapSideBySideWhite.Rd create mode 100644 bindings/r/man/Garch11.Rd create mode 100644 bindings/r/man/GarmanKlassVolatility.Rd create mode 100644 bindings/r/man/Gartley.Rd create mode 100644 bindings/r/man/GatorOscillator.Rd create mode 100644 bindings/r/man/GeneralizedDema.Rd create mode 100644 bindings/r/man/GeometricMa.Rd create mode 100644 bindings/r/man/GoldenPocket.Rd create mode 100644 bindings/r/man/GrangerCausality.Rd create mode 100644 bindings/r/man/GravestoneDoji.Rd create mode 100644 bindings/r/man/Hammer.Rd create mode 100644 bindings/r/man/HangingMan.Rd create mode 100644 bindings/r/man/Harami.Rd create mode 100644 bindings/r/man/HaramiCross.Rd create mode 100644 bindings/r/man/HasbrouckInformationShare.Rd create mode 100644 bindings/r/man/HeadAndShoulders.Rd create mode 100644 bindings/r/man/HeikinAshi.Rd create mode 100644 bindings/r/man/HeikinAshiOscillator.Rd create mode 100644 bindings/r/man/HiLoActivator.Rd create mode 100644 bindings/r/man/HighLowIndex.Rd create mode 100644 bindings/r/man/HighLowRange.Rd create mode 100644 bindings/r/man/HighLowVolumeNodes.Rd create mode 100644 bindings/r/man/HighWave.Rd create mode 100644 bindings/r/man/HighpassFilter.Rd create mode 100644 bindings/r/man/Hikkake.Rd create mode 100644 bindings/r/man/HikkakeModified.Rd create mode 100644 bindings/r/man/HilbertDominantCycle.Rd create mode 100644 bindings/r/man/HistoricalVolatility.Rd create mode 100644 bindings/r/man/Hma.Rd create mode 100644 bindings/r/man/HoltWinters.Rd create mode 100644 bindings/r/man/HomingPigeon.Rd create mode 100644 bindings/r/man/HtDcPhase.Rd create mode 100644 bindings/r/man/HtPhasor.Rd create mode 100644 bindings/r/man/HtTrendMode.Rd create mode 100644 bindings/r/man/HurstChannel.Rd create mode 100644 bindings/r/man/HurstExponent.Rd create mode 100644 bindings/r/man/Ichimoku.Rd create mode 100644 bindings/r/man/IdenticalThreeCrows.Rd create mode 100644 bindings/r/man/ImbalanceBars.Rd create mode 100644 bindings/r/man/InNeck.Rd create mode 100644 bindings/r/man/Inertia.Rd create mode 100644 bindings/r/man/InformationRatio.Rd create mode 100644 bindings/r/man/InitialBalance.Rd create mode 100644 bindings/r/man/InstantaneousTrendline.Rd create mode 100644 bindings/r/man/IntradayIntensity.Rd create mode 100644 bindings/r/man/IntradayMomentumIndex.Rd create mode 100644 bindings/r/man/IntradayVolatilityProfile.Rd create mode 100644 bindings/r/man/InverseFisherTransform.Rd create mode 100644 bindings/r/man/InvertedHammer.Rd create mode 100644 bindings/r/man/JarqueBera.Rd create mode 100644 bindings/r/man/Jma.Rd create mode 100644 bindings/r/man/JumpIndicator.Rd create mode 100644 bindings/r/man/KRatio.Rd create mode 100644 bindings/r/man/KagiBars.Rd create mode 100644 bindings/r/man/KalmanHedgeRatio.Rd create mode 100644 bindings/r/man/Kama.Rd create mode 100644 bindings/r/man/KaseDevStop.Rd create mode 100644 bindings/r/man/KasePermissionStochastic.Rd create mode 100644 bindings/r/man/KellyCriterion.Rd create mode 100644 bindings/r/man/Keltner.Rd create mode 100644 bindings/r/man/KendallTau.Rd create mode 100644 bindings/r/man/Kicking.Rd create mode 100644 bindings/r/man/KickingByLength.Rd create mode 100644 bindings/r/man/Kst.Rd create mode 100644 bindings/r/man/Kurtosis.Rd create mode 100644 bindings/r/man/Kvo.Rd create mode 100644 bindings/r/man/KylesLambda.Rd create mode 100644 bindings/r/man/LadderBottom.Rd create mode 100644 bindings/r/man/LaguerreRsi.Rd create mode 100644 bindings/r/man/LeadLagCrossCorrelation.Rd create mode 100644 bindings/r/man/LinRegAngle.Rd create mode 100644 bindings/r/man/LinRegChannel.Rd create mode 100644 bindings/r/man/LinRegIntercept.Rd create mode 100644 bindings/r/man/LinRegSlope.Rd create mode 100644 bindings/r/man/LinearRegression.Rd create mode 100644 bindings/r/man/LiquidationFeatures.Rd create mode 100644 bindings/r/man/LogReturn.Rd create mode 100644 bindings/r/man/LongLeggedDoji.Rd create mode 100644 bindings/r/man/LongLine.Rd create mode 100644 bindings/r/man/LongShortRatio.Rd create mode 100644 bindings/r/man/M2Measure.Rd create mode 100644 bindings/r/man/MaEnvelope.Rd create mode 100644 bindings/r/man/MacdExt.Rd create mode 100644 bindings/r/man/MacdFix.Rd create mode 100644 bindings/r/man/MacdHistogram.Rd create mode 100644 bindings/r/man/MacdIndicator.Rd create mode 100644 bindings/r/man/Mama.Rd create mode 100644 bindings/r/man/MarketFacilitationIndex.Rd create mode 100644 bindings/r/man/MartinRatio.Rd create mode 100644 bindings/r/man/Marubozu.Rd create mode 100644 bindings/r/man/MassIndex.Rd create mode 100644 bindings/r/man/MatHold.Rd create mode 100644 bindings/r/man/MatchingLow.Rd create mode 100644 bindings/r/man/MaxDrawdown.Rd create mode 100644 bindings/r/man/McClellanOscillator.Rd create mode 100644 bindings/r/man/McClellanSummationIndex.Rd create mode 100644 bindings/r/man/McGinleyDynamic.Rd create mode 100644 bindings/r/man/MedianAbsoluteDeviation.Rd create mode 100644 bindings/r/man/MedianChannel.Rd create mode 100644 bindings/r/man/MedianMa.Rd create mode 100644 bindings/r/man/MedianPrice.Rd create mode 100644 bindings/r/man/Mfi.Rd create mode 100644 bindings/r/man/Microprice.Rd create mode 100644 bindings/r/man/MidPoint.Rd create mode 100644 bindings/r/man/MidPrice.Rd create mode 100644 bindings/r/man/MinusDi.Rd create mode 100644 bindings/r/man/MinusDm.Rd create mode 100644 bindings/r/man/ModifiedMaStop.Rd create mode 100644 bindings/r/man/Mom.Rd create mode 100644 bindings/r/man/MorningDojiStar.Rd create mode 100644 bindings/r/man/MorningEveningStar.Rd create mode 100644 bindings/r/man/MurreyMathLines.Rd create mode 100644 bindings/r/man/NakedPoc.Rd create mode 100644 bindings/r/man/Natr.Rd create mode 100644 bindings/r/man/NewHighsNewLows.Rd create mode 100644 bindings/r/man/NewPriceLines.Rd create mode 100644 bindings/r/man/Nrtr.Rd create mode 100644 bindings/r/man/Nvi.Rd create mode 100644 bindings/r/man/OIPriceDivergence.Rd create mode 100644 bindings/r/man/OIWeighted.Rd create mode 100644 bindings/r/man/Obv.Rd create mode 100644 bindings/r/man/OiToVolumeRatio.Rd create mode 100644 bindings/r/man/OmegaRatio.Rd create mode 100644 bindings/r/man/OnNeck.Rd create mode 100644 bindings/r/man/OpenInterestDelta.Rd create mode 100644 bindings/r/man/OpenInterestMomentum.Rd create mode 100644 bindings/r/man/OpeningMarubozu.Rd create mode 100644 bindings/r/man/OpeningRange.Rd create mode 100644 bindings/r/man/OrderBookImbalanceFull.Rd create mode 100644 bindings/r/man/OrderBookImbalanceTop1.Rd create mode 100644 bindings/r/man/OrderBookImbalanceTopN.Rd create mode 100644 bindings/r/man/OrderFlowImbalance.Rd create mode 100644 bindings/r/man/OuHalfLife.Rd create mode 100644 bindings/r/man/OvernightGap.Rd create mode 100644 bindings/r/man/OvernightIntradayReturn.Rd create mode 100644 bindings/r/man/PainIndex.Rd create mode 100644 bindings/r/man/PairSpreadZScore.Rd create mode 100644 bindings/r/man/PairwiseBeta.Rd create mode 100644 bindings/r/man/ParkinsonVolatility.Rd create mode 100644 bindings/r/man/PearsonCorrelation.Rd create mode 100644 bindings/r/man/PercentAboveMa.Rd create mode 100644 bindings/r/man/PercentB.Rd create mode 100644 bindings/r/man/PercentageTrailingStop.Rd create mode 100644 bindings/r/man/PerpetualPremiumIndex.Rd create mode 100644 bindings/r/man/Pgo.Rd create mode 100644 bindings/r/man/PiercingDarkCloud.Rd create mode 100644 bindings/r/man/Pin.Rd create mode 100644 bindings/r/man/PivotReversal.Rd create mode 100644 bindings/r/man/PlusDi.Rd create mode 100644 bindings/r/man/PlusDm.Rd create mode 100644 bindings/r/man/Pmo.Rd create mode 100644 bindings/r/man/PointAndFigureBars.Rd create mode 100644 bindings/r/man/PolarizedFractalEfficiency.Rd create mode 100644 bindings/r/man/Ppo.Rd create mode 100644 bindings/r/man/PpoHistogram.Rd create mode 100644 bindings/r/man/ProfileShape.Rd create mode 100644 bindings/r/man/ProfitFactor.Rd create mode 100644 bindings/r/man/ProjectionBands.Rd create mode 100644 bindings/r/man/ProjectionOscillator.Rd create mode 100644 bindings/r/man/Psar.Rd create mode 100644 bindings/r/man/Pvi.Rd create mode 100644 bindings/r/man/Qqe.Rd create mode 100644 bindings/r/man/Qstick.Rd create mode 100644 bindings/r/man/QuartileBands.Rd create mode 100644 bindings/r/man/QuotedSpread.Rd create mode 100644 bindings/r/man/RSquared.Rd create mode 100644 bindings/r/man/RangeBars.Rd create mode 100644 bindings/r/man/RealizedSpread.Rd create mode 100644 bindings/r/man/RealizedVolatility.Rd create mode 100644 bindings/r/man/RecoveryFactor.Rd create mode 100644 bindings/r/man/RectangleRange.Rd create mode 100644 bindings/r/man/Reflex.Rd create mode 100644 bindings/r/man/RegimeLabel.Rd create mode 100644 bindings/r/man/RelativeStrengthAB.Rd create mode 100644 bindings/r/man/RenkoBars.Rd create mode 100644 bindings/r/man/RenkoTrailingStop.Rd create mode 100644 bindings/r/man/RickshawMan.Rd create mode 100644 bindings/r/man/RisingThreeMethods.Rd create mode 100644 bindings/r/man/Rmi.Rd create mode 100644 bindings/r/man/Roc.Rd create mode 100644 bindings/r/man/Rocp.Rd create mode 100644 bindings/r/man/Rocr.Rd create mode 100644 bindings/r/man/Rocr100.Rd create mode 100644 bindings/r/man/RogersSatchellVolatility.Rd create mode 100644 bindings/r/man/RollMeasure.Rd create mode 100644 bindings/r/man/RollingCorrelation.Rd create mode 100644 bindings/r/man/RollingCovariance.Rd create mode 100644 bindings/r/man/RollingIqr.Rd create mode 100644 bindings/r/man/RollingMinMaxScaler.Rd create mode 100644 bindings/r/man/RollingPercentileRank.Rd create mode 100644 bindings/r/man/RollingQuantile.Rd create mode 100644 bindings/r/man/RollingVwap.Rd create mode 100644 bindings/r/man/RoofingFilter.Rd create mode 100644 bindings/r/man/Rsi.Rd create mode 100644 bindings/r/man/Rsx.Rd create mode 100644 bindings/r/man/RunBars.Rd create mode 100644 bindings/r/man/Rvi.Rd create mode 100644 bindings/r/man/RviVolatility.Rd create mode 100644 bindings/r/man/Rwi.Rd create mode 100644 bindings/r/man/SampleEntropy.Rd create mode 100644 bindings/r/man/SarExt.Rd create mode 100644 bindings/r/man/SeasonalZScore.Rd create mode 100644 bindings/r/man/SeparatingLines.Rd create mode 100644 bindings/r/man/SessionHighLow.Rd create mode 100644 bindings/r/man/SessionRange.Rd create mode 100644 bindings/r/man/SessionVwap.Rd create mode 100644 bindings/r/man/ShannonEntropy.Rd create mode 100644 bindings/r/man/Shark.Rd create mode 100644 bindings/r/man/SharpeRatio.Rd create mode 100644 bindings/r/man/ShootingStar.Rd create mode 100644 bindings/r/man/ShortLine.Rd create mode 100644 bindings/r/man/SignedVolume.Rd create mode 100644 bindings/r/man/SineWave.Rd create mode 100644 bindings/r/man/SineWeightedMa.Rd create mode 100644 bindings/r/man/SinglePrints.Rd create mode 100644 bindings/r/man/Skewness.Rd create mode 100644 bindings/r/man/Sma.Rd create mode 100644 bindings/r/man/Smi.Rd create mode 100644 bindings/r/man/Smma.Rd create mode 100644 bindings/r/man/SmoothedHeikinAshi.Rd create mode 100644 bindings/r/man/SortinoRatio.Rd create mode 100644 bindings/r/man/SpearmanCorrelation.Rd create mode 100644 bindings/r/man/SpinningTop.Rd create mode 100644 bindings/r/man/SpreadAr1Coefficient.Rd create mode 100644 bindings/r/man/SpreadBollingerBands.Rd create mode 100644 bindings/r/man/SpreadHurst.Rd create mode 100644 bindings/r/man/StalledPattern.Rd create mode 100644 bindings/r/man/StandardError.Rd create mode 100644 bindings/r/man/StandardErrorBands.Rd create mode 100644 bindings/r/man/StarcBands.Rd create mode 100644 bindings/r/man/Stc.Rd create mode 100644 bindings/r/man/StdDev.Rd create mode 100644 bindings/r/man/StepTrailingStop.Rd create mode 100644 bindings/r/man/SterlingRatio.Rd create mode 100644 bindings/r/man/StickSandwich.Rd create mode 100644 bindings/r/man/StochRsi.Rd create mode 100644 bindings/r/man/Stochastic.Rd create mode 100644 bindings/r/man/StochasticCci.Rd create mode 100644 bindings/r/man/SuperSmoother.Rd create mode 100644 bindings/r/man/SuperTrend.Rd create mode 100644 bindings/r/man/T3.Rd create mode 100644 bindings/r/man/TailRatio.Rd create mode 100644 bindings/r/man/TakerBuySellRatio.Rd create mode 100644 bindings/r/man/Takuri.Rd create mode 100644 bindings/r/man/TasukiGap.Rd create mode 100644 bindings/r/man/TdCamouflage.Rd create mode 100644 bindings/r/man/TdClop.Rd create mode 100644 bindings/r/man/TdClopwin.Rd create mode 100644 bindings/r/man/TdCombo.Rd create mode 100644 bindings/r/man/TdCountdown.Rd create mode 100644 bindings/r/man/TdDWave.Rd create mode 100644 bindings/r/man/TdDeMarker.Rd create mode 100644 bindings/r/man/TdDifferential.Rd create mode 100644 bindings/r/man/TdLines.Rd create mode 100644 bindings/r/man/TdMovingAverage.Rd create mode 100644 bindings/r/man/TdOpen.Rd create mode 100644 bindings/r/man/TdPressure.Rd create mode 100644 bindings/r/man/TdPropulsion.Rd create mode 100644 bindings/r/man/TdRangeProjection.Rd create mode 100644 bindings/r/man/TdRei.Rd create mode 100644 bindings/r/man/TdRiskLevel.Rd create mode 100644 bindings/r/man/TdSequential.Rd create mode 100644 bindings/r/man/TdSetup.Rd create mode 100644 bindings/r/man/TdTrap.Rd create mode 100644 bindings/r/man/Tema.Rd create mode 100644 bindings/r/man/TermStructureBasis.Rd create mode 100644 bindings/r/man/ThreeDrives.Rd create mode 100644 bindings/r/man/ThreeInside.Rd create mode 100644 bindings/r/man/ThreeLineBreak.Rd create mode 100644 bindings/r/man/ThreeLineBreakBars.Rd create mode 100644 bindings/r/man/ThreeLineStrike.Rd create mode 100644 bindings/r/man/ThreeOutside.Rd create mode 100644 bindings/r/man/ThreeSoldiersOrCrows.Rd create mode 100644 bindings/r/man/ThreeStarsInSouth.Rd create mode 100644 bindings/r/man/Thrusting.Rd create mode 100644 bindings/r/man/TickBars.Rd create mode 100644 bindings/r/man/TickIndex.Rd create mode 100644 bindings/r/man/Tii.Rd create mode 100644 bindings/r/man/TimeBasedStop.Rd create mode 100644 bindings/r/man/TimeOfDayReturnProfile.Rd create mode 100644 bindings/r/man/TowerTopBottom.Rd create mode 100644 bindings/r/man/TpoProfile.Rd create mode 100644 bindings/r/man/TradeImbalance.Rd create mode 100644 bindings/r/man/TradeSignAutocorrelation.Rd create mode 100644 bindings/r/man/TradeVolumeIndex.Rd create mode 100644 bindings/r/man/TrendLabel.Rd create mode 100644 bindings/r/man/TrendStrengthIndex.Rd create mode 100644 bindings/r/man/Trendflex.Rd create mode 100644 bindings/r/man/TreynorRatio.Rd create mode 100644 bindings/r/man/Triangle.Rd create mode 100644 bindings/r/man/Trima.Rd create mode 100644 bindings/r/man/Trin.Rd create mode 100644 bindings/r/man/TripleTopBottom.Rd create mode 100644 bindings/r/man/Tristar.Rd create mode 100644 bindings/r/man/Trix.Rd create mode 100644 bindings/r/man/TrueRange.Rd create mode 100644 bindings/r/man/Tsf.Rd create mode 100644 bindings/r/man/TsfOscillator.Rd create mode 100644 bindings/r/man/Tsi.Rd create mode 100644 bindings/r/man/Tsv.Rd create mode 100644 bindings/r/man/TtmSqueeze.Rd create mode 100644 bindings/r/man/TtmTrend.Rd create mode 100644 bindings/r/man/TurnOfMonth.Rd create mode 100644 bindings/r/man/Tweezer.Rd create mode 100644 bindings/r/man/TwiggsMoneyFlow.Rd create mode 100644 bindings/r/man/TwoCrows.Rd create mode 100644 bindings/r/man/TypicalPrice.Rd create mode 100644 bindings/r/man/UlcerIndex.Rd create mode 100644 bindings/r/man/UltimateOscillator.Rd create mode 100644 bindings/r/man/UniqueThreeRiver.Rd create mode 100644 bindings/r/man/UniversalOscillator.Rd create mode 100644 bindings/r/man/UpDownVolumeRatio.Rd create mode 100644 bindings/r/man/UpsideGapThreeMethods.Rd create mode 100644 bindings/r/man/UpsideGapTwoCrows.Rd create mode 100644 bindings/r/man/UpsidePotentialRatio.Rd create mode 100644 bindings/r/man/ValueArea.Rd create mode 100644 bindings/r/man/ValueAtRisk.Rd create mode 100644 bindings/r/man/Variance.Rd create mode 100644 bindings/r/man/VarianceRatio.Rd create mode 100644 bindings/r/man/VerticalHorizontalFilter.Rd create mode 100644 bindings/r/man/Vidya.Rd create mode 100644 bindings/r/man/VolatilityCone.Rd create mode 100644 bindings/r/man/VolatilityOfVolatility.Rd create mode 100644 bindings/r/man/VolatilityRatio.Rd create mode 100644 bindings/r/man/VoltyStop.Rd create mode 100644 bindings/r/man/VolumeBars.Rd create mode 100644 bindings/r/man/VolumeByTimeProfile.Rd create mode 100644 bindings/r/man/VolumeOscillator.Rd create mode 100644 bindings/r/man/VolumePriceTrend.Rd create mode 100644 bindings/r/man/VolumeProfile.Rd create mode 100644 bindings/r/man/VolumeRsi.Rd create mode 100644 bindings/r/man/VolumeWeightedMacd.Rd create mode 100644 bindings/r/man/VolumeWeightedSr.Rd create mode 100644 bindings/r/man/Vortex.Rd create mode 100644 bindings/r/man/Vpin.Rd create mode 100644 bindings/r/man/Vwap.Rd create mode 100644 bindings/r/man/VwapStdDevBands.Rd create mode 100644 bindings/r/man/Vwma.Rd create mode 100644 bindings/r/man/Vzo.Rd create mode 100644 bindings/r/man/Wad.Rd create mode 100644 bindings/r/man/WavePm.Rd create mode 100644 bindings/r/man/WaveTrend.Rd create mode 100644 bindings/r/man/Wedge.Rd create mode 100644 bindings/r/man/WeightedClose.Rd create mode 100644 bindings/r/man/WickRatio.Rd create mode 100644 bindings/r/man/WilliamsFractals.Rd create mode 100644 bindings/r/man/WilliamsR.Rd create mode 100644 bindings/r/man/WinRate.Rd create mode 100644 bindings/r/man/Wma.Rd create mode 100644 bindings/r/man/WoodiePivots.Rd create mode 100644 bindings/r/man/YangZhangVolatility.Rd create mode 100644 bindings/r/man/YoyoExit.Rd create mode 100644 bindings/r/man/ZScore.Rd create mode 100644 bindings/r/man/ZeroLagMacd.Rd create mode 100644 bindings/r/man/ZigZag.Rd create mode 100644 bindings/r/man/Zlema.Rd create mode 100644 bindings/r/man/batch.Rd create mode 100644 bindings/r/man/reset.Rd create mode 100644 bindings/r/man/update.wickra_indicator.Rd create mode 100644 bindings/r/man/wickra-package.Rd create mode 100644 bindings/r/src/.gitignore create mode 100644 bindings/r/src/Makevars create mode 100644 bindings/r/src/Makevars.win create mode 100644 bindings/r/src/install.libs.R create mode 100644 bindings/r/src/wickra.c create mode 100644 bindings/r/tests/testthat.R create mode 100644 bindings/r/tests/testthat/test-archetypes.R create mode 100644 examples/r/.gitignore create mode 100644 examples/r/README.md create mode 100644 examples/r/_common.R create mode 100644 examples/r/backtest.R create mode 100644 examples/r/fetch_btcusdt.R create mode 100644 examples/r/live_binance.R create mode 100644 examples/r/multi_timeframe.R create mode 100644 examples/r/parallel_assets.R create mode 100644 examples/r/strategy_bollinger_squeeze.R create mode 100644 examples/r/strategy_macd_adx.R create mode 100644 examples/r/strategy_rsi_mean_reversion.R create mode 100644 examples/r/streaming.R diff --git a/.gitattributes b/.gitattributes index b82e6a46..20a1efc3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -16,3 +16,11 @@ bindings/c/include/wickra.h text eol=lf go.mod text eol=lf go.sum text eol=lf +# R binding: `R CMD check` requires LF in sources, Makevars and shell scripts. +*.R text eol=lf +*.Rd text eol=lf +bindings/r/configure.win text eol=lf +bindings/r/src/Makevars text eol=lf +bindings/r/src/Makevars.win text eol=lf +bindings/r/src/wickra.c text eol=lf + diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ad5dc8a9..f2e61250 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -30,7 +30,7 @@ assignees: "" ## Environment - Wickra version: -- Language / binding: +- Language / binding: - OS and architecture: - Rust / Python / Node / .NET version (If relevant): diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index fe6b4dcd..f458317d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -28,6 +28,7 @@ assignees: "" - [ ] Should be exposed in the C ABI - [ ] Should be exposed in the C# / .NET binding - [ ] Should be exposed in the Go binding +- [ ] Should be exposed in the R binding ## Additional context diff --git a/.github/ISSUE_TEMPLATE/performance_regression.md b/.github/ISSUE_TEMPLATE/performance_regression.md index 136d1dfb..f7d8129b 100644 --- a/.github/ISSUE_TEMPLATE/performance_regression.md +++ b/.github/ISSUE_TEMPLATE/performance_regression.md @@ -13,7 +13,7 @@ assignees: [] ## Affected code path - Indicator / API: `e.g. EMA.update` -- Binding: `Rust / Python / Node / Wasm / C ABI / C# (.NET) / Go` +- Binding: `Rust / Python / Node / Wasm / C ABI / C# (.NET) / Go / R` - Hot loop or one-shot call? ## Versions compared diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 77b07a7a..c9067eae 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -33,4 +33,4 @@ import wickra as ta ## Environment (Only if relevant) - Wickra version: `e.g. 0.4.2` -- Binding: `Rust / Python / Node / Wasm / C ABI / C# (.NET) / Go` +- Binding: `Rust / Python / Node / Wasm / C ABI / C# (.NET) / Go / R` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index addcfff2..92f45d1d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,7 +22,7 @@ - [ ] `cargo clippy --workspace --all-targets -- -D warnings` is clean. - [ ] `cargo test --workspace` passes. - [ ] New behaviour has tests; bug fixes have a regression test. -- [ ] Public API changes are mirrored in the Python / Node / WASM bindings, and the C ABI + C# + Go bindings are regenerated +- [ ] Public API changes are mirrored in the Python / Node / WASM bindings, and the C ABI + C# + Go + R bindings are regenerated and their type stubs (If applicable). - [ ] The relevant page on the [documentation site](https://docs.wickra.org) and the `README.md` are updated (If applicable). Docs edits go to a diff --git a/.github/PULL_REQUEST_TEMPLATE/detailed.md b/.github/PULL_REQUEST_TEMPLATE/detailed.md index 018eaa94..35282f8e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/detailed.md +++ b/.github/PULL_REQUEST_TEMPLATE/detailed.md @@ -26,6 +26,7 @@ Please fill in the sections below. Delete any that don't apply. - [ ] C ABI (`bindings/c`) - [ ] C# / .NET binding (`bindings/csharp`) - [ ] Go binding (`bindings/go`) +- [ ] R binding (`bindings/r`) - [ ] Examples / docs ## Linked issues diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2a405d2..1dfa0f55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -826,6 +826,76 @@ jobs: go run "./$d" done + r: + name: R on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + env: + WICKRA_INCLUDE_DIR: ${{ github.workspace }}/bindings/c/include + WICKRA_LIB_DIR: ${{ github.workspace }}/target/release + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable branch, 2026-03-27 + + - name: Cache cargo + uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + continue-on-error: true + timeout-minutes: 6 + + # The binding compiles a thin .Call glue layer against the C ABI hub; build + # the library first. On Windows configure.win bundles a renamed copy + # (wickra_abi.dll) so the package's own wickra.dll does not collide with it. + - name: Build the C ABI library + run: cargo build -p wickra-c --release + + - name: Set up R + uses: r-lib/actions/setup-r@a51a8012b0aab7c32ef9d19bf54da93f3254335e # v2 + with: + r-version: "release" + use-public-rspm: true + + # Use the repos configured by setup-r (use-public-rspm) so Linux installs + # binary packages — building testthat's deps from source is slow and flaky. + - name: Install test dependency + run: Rscript -e 'install.packages("testthat")' + + - name: Install and test the R binding + shell: bash + # github.workspace is a backslash path on Windows; configure.win (sh) and + # mingw need forward slashes. On Linux/macOS the rpath points at + # WICKRA_LIB_DIR; export the loader path too as a belt-and-suspenders. + run: | + export WICKRA_INCLUDE_DIR="${WICKRA_INCLUDE_DIR//\\//}" + export WICKRA_LIB_DIR="${WICKRA_LIB_DIR//\\//}" + export LD_LIBRARY_PATH="$WICKRA_LIB_DIR:$LD_LIBRARY_PATH" + export DYLD_LIBRARY_PATH="$WICKRA_LIB_DIR:$DYLD_LIBRARY_PATH" + R CMD INSTALL bindings/r + Rscript -e 'library(testthat); library(wickra); test_dir("bindings/r/tests/testthat", stop_on_failure = TRUE)' + + - name: Run the offline R examples + shell: bash + run: | + export WICKRA_LIB_DIR="${WICKRA_LIB_DIR//\\//}" + export LD_LIBRARY_PATH="$WICKRA_LIB_DIR:$LD_LIBRARY_PATH" + export DYLD_LIBRARY_PATH="$WICKRA_LIB_DIR:$DYLD_LIBRARY_PATH" + cd examples/r + for f in streaming backtest multi_timeframe parallel_assets \ + strategy_rsi_mean_reversion strategy_macd_adx strategy_bollinger_squeeze; do + Rscript "$f.R" + done + + # fetch_btcusdt / live_binance need the network (and jsonlite / websocket); + # build-check that they parse without running them. + - name: Parse the network R examples + run: Rscript -e 'invisible(lapply(c("examples/r/fetch_btcusdt.R", "examples/r/live_binance.R"), parse)); cat("network R examples parse OK\n")' + # The cross-library benchmark has moved to a dedicated scheduled workflow # (.github/workflows/bench.yml) — see audit finding R10. It runs nightly # at 03:00 UTC and on-demand via `workflow_dispatch`, and is no longer on diff --git a/.github/workflows/sync-about.yml b/.github/workflows/sync-about.yml index 6d6b1323..773601ca 100644 --- a/.github/workflows/sync-about.yml +++ b/.github/workflows/sync-about.yml @@ -156,7 +156,7 @@ jobs: # actually live (Cloudflare Pages, P8.1); merging this PR is therefore # gated on the domain resolving, otherwise the About link would 404. homepage="https://docs.wickra.org" - desc="Streaming-first technical indicators with a Rust core and Python, Node.js, WebAssembly, C ABI, .NET, and Go bindings. ${n} indicators, O(1) per-tick updates, no system dependencies. Drop-in TA-Lib replacement." + desc="Streaming-first technical indicators with a Rust core and Python, Node.js, WebAssembly, C ABI, .NET, Go, and R bindings. ${n} indicators, O(1) per-tick updates, no system dependencies. Drop-in TA-Lib replacement." # Enforce the homepage unconditionally — it is a constant, so this both # corrects the stale kingchenc URL and self-heals any future drift. # Same Administration-write permission as --description (no extra scope). diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 3046d88d..bcb89a0b 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -46,8 +46,9 @@ wasm-bindgen). The C ABI is the *hub* every other C-capable language links against: it builds to a `cdylib`/`staticlib` plus a generated `wickra.h`, and downstream languages link that one artifact rather than each re-wrapping the core. C and C++ link it directly; the **C# / .NET** binding (`bindings/csharp`, -on NuGet) and the **Go** binding (`bindings/go`, cgo) are generated from -`wickra.h`, with Java / R planned the same way. +on NuGet), the **Go** binding (`bindings/go`, cgo) and the **R** binding +(`bindings/r`, `.Call`) are generated from `wickra.h`, with Java planned the +same way. | Crate | Path | What it owns | Public deps | |---|---|---|---| diff --git a/CHANGELOG.md b/CHANGELOG.md index d660fd07..c6daf1b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- **R binding (`bindings/r`)** — an R package reaching the C ABI hub through R's + native `.Call` interface, exposing all 514 indicators as constructors that + return a `wickra_indicator` object with `update`/`batch`/`reset` methods. The + C glue and R wrappers are generated from `wickra.h`; the native handle is freed + by a registered finalizer. Ships a full example suite mirroring the C, C# and + Go examples; distributed for r-universe / source install. ## [0.7.7] - 2026-06-09 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf22cff4..4dca468b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,7 @@ licensed as above, without any additional terms or conditions. | `bindings/c` | C ABI — `cdylib` + `staticlib` + generated `include/wickra.h`. The hub for C / C++ and any C-capable language. | | `bindings/csharp` | .NET binding over the C ABI (`Wickra` on NuGet) — `[LibraryImport]` P/Invoke generated from `wickra.h`. | | `bindings/go` | Go binding over the C ABI via cgo (module tag `bindings/go/vX.Y.Z`) — wrappers generated from `wickra.h`. | +| `bindings/r` | R binding over the C ABI via `.Call` (R package) — C glue + R wrappers generated from `wickra.h`. | | `examples/` | Runnable examples. | | `docs/` | Pointer to the documentation site (docs.wickra.org); the docs live in the `wickra-lib/wickra-docs` repo. | @@ -110,7 +111,9 @@ installed. Dependabot also keeps the `.github/requirements` pins current. commit `src/lib.rs` + `include/wickra.h`. The C# binding (`bindings/csharp`) is generated from `wickra.h`, so regenerate and commit its `Generated/*.g.cs` too. The Go binding (`bindings/go`) is likewise generated from `wickra.h`, so - regenerate and commit `indicators_gen.go` (`gofmt`-clean). + regenerate and commit `indicators_gen.go` (`gofmt`-clean). The R binding + (`bindings/r`) is generated from `wickra.h` too, so regenerate and commit + `src/wickra.c` + `R/indicators.R`. - **Docs.** Update the relevant page on the [documentation site](https://docs.wickra.org) and the `README.md` when behaviour or the public API changes. The docs live in diff --git a/README.md b/README.md index e2ee9295..e148de7e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Wickra is a multi-language technical-analysis library with a Rust core and native bindings for Python, Node.js and WebAssembly, plus a C ABI that C, C++, -C# / .NET, Go and any other C-capable language links against. Every indicator is a +C# / .NET, Go, R and any other C-capable language links against. Every indicator is a state machine that updates in O(1) per new data point, so live trading bots and historical backtests share the exact same implementation. @@ -51,7 +51,8 @@ Full documentation lives at **[docs.wickra.org](https://docs.wickra.org)**: [WASM](https://docs.wickra.org/Quickstart-WASM), [C](https://docs.wickra.org/Quickstart-C), [C#](https://docs.wickra.org/Quickstart-CSharp), - [Go](https://docs.wickra.org/Quickstart-Go). + [Go](https://docs.wickra.org/Quickstart-Go), + [R](https://docs.wickra.org/Quickstart-R). - **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for every one of the 514 indicators; start at the [indicators overview](https://docs.wickra.org/Indicators-Overview). @@ -77,7 +78,7 @@ times to get there. metrics — every single one updating in **O(1) per tick**. TA-Lib ships ~150 and none of them stream. - **One Rust core, five first-class targets.** Native **Python · Node.js · - WebAssembly · Rust** plus a **C ABI** for C / C++, C# / .NET, Go and any other C-capable language — + WebAssembly · Rust** plus a **C ABI** for C / C++, C# / .NET, Go, R and any other C-capable language — identical math, identical results, zero per-language reimplementation and zero GIL bottleneck. - **Correct by construction, not by hope.** Every `update` validates its input, @@ -102,7 +103,7 @@ Every other library forces one of those compromises. Wickra doesn't: | Library | Install | Streaming | Languages | Indicators | Active | |------------------|-------------|-------------|-----------------------------|-----------:|--------| | **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM** | **514** | **yes** | -| | | | **C · C# · Go** | | | +| | | | **C · C# · Go · R** | | | | kand | clean | yes | Python · WASM · Rust | ~60 | yes | | ta-rs | clean | yes | Rust only | ~30 | stale | | yata | clean | partial | Rust only | ~35 | yes | @@ -174,7 +175,7 @@ construct it in signed mode (`Doji::new().signed()`, `Doji(signed=True)`, `new Doji(true)`) for a dragonfly / gravestone `±1` reading. Adding a new indicator means implementing one trait in Rust; every binding -inherits it automatically (the C ABI — and the C# and Go bindings generated from +inherits it automatically (the C ABI — and the C#, Go and R bindings generated from it — regenerate from the core). ## Languages @@ -188,6 +189,7 @@ it — regenerate from the core). | C / C++ (C ABI) | header + library, see [`bindings/c`](bindings/c) | `examples/c/streaming.c` | | C# / .NET (C ABI) | `dotnet add package Wickra`, see [`bindings/csharp`](bindings/csharp) | `examples/csharp/streaming` | | Go (cgo, C ABI) | `go get github.com/wickra-lib/wickra/bindings/go`, see [`bindings/go`](bindings/go) | `examples/go/streaming` | +| R (`.Call`, C ABI) | `R CMD INSTALL bindings/r`, see [`bindings/r`](bindings/r) | `examples/r/streaming.R` | Each binding ships several runnable examples (streaming, backtest, live feed); [`examples/README.md`](examples/README.md) is the full cross-language index. @@ -259,7 +261,8 @@ wickra/ │ ├── wasm/ wasm-bindgen (browsers, bundlers, Node) │ ├── c/ C ABI (cdylib + staticlib) + generated include/wickra.h │ ├── csharp/ .NET binding over the C ABI (publishes on NuGet) -│ └── go/ Go binding over the C ABI via cgo (module tag) +│ ├── go/ Go binding over the C ABI via cgo (module tag) +│ └── r/ R binding over the C ABI via .Call (R package) ├── examples/ examples/README.md indexes every language │ ├── data/ real BTCUSDT OHLCV datasets, one per timeframe │ ├── rust/ Rust workspace member (`wickra-examples`) @@ -268,7 +271,8 @@ wickra/ │ ├── wasm/ browser demo for `wickra-wasm` │ ├── c/ C smoke + streaming, C++ RAII wrapper │ ├── csharp/ streaming, backtest, strategies (load `Wickra`) -│ └── go/ streaming, backtest, strategies (cgo binding) +│ ├── go/ streaming, backtest, strategies (cgo binding) +│ └── r/ streaming, backtest, strategies (.Call binding) └── .github/workflows/ CI and release pipelines ``` @@ -308,6 +312,10 @@ dotnet test bindings/csharp/Wickra.Tests/Wickra.Tests.csproj # Go binding (requires a C compiler for cgo; links the C ABI above) cp target/release/libwickra.so bindings/go/lib/ # .dylib on macOS, wickra.dll on Windows cd bindings/go && go test ./... + +# R binding (requires a C toolchain / Rtools; links the C ABI above) +WICKRA_INCLUDE_DIR="$PWD/bindings/c/include" WICKRA_LIB_DIR="$PWD/target/release" \ + R CMD INSTALL bindings/r ``` ## Testing @@ -329,6 +337,8 @@ Every layer is covered; run the suites with the commands in and reference values. - `bindings/go`: `go test` cases covering one indicator per FFI archetype (scalar/batch, multi-output, bars, profile, array input), reset, and lifecycle. +- `bindings/r`: `testthat` cases covering one indicator per FFI archetype + (scalar/batch, multi-output, bars, profile, array input), reset, and validation. ## Contributing diff --git a/ROADMAP.md b/ROADMAP.md index df89ff78..d90ae7b5 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -22,7 +22,7 @@ minor releases; breaking changes are called out in the changelog. - **Performance.** Keep per-tick updates O(1) and maintain the benchmark suite; investigate further allocation and cache improvements. - **Bindings parity.** Keep the Python, Node.js and WebAssembly bindings — plus - the C ABI and the C# / .NET and Go bindings generated from it — in lockstep with the + the C ABI and the C# / .NET, Go and R bindings generated from it — in lockstep with the Rust core, including type stubs and platform coverage. - **Documentation.** Maintain a deep-dive page per indicator on , plus quickstarts and cookbook material. diff --git a/SUPPORT.md b/SUPPORT.md index 38daa7da..8209c3a4 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -7,7 +7,7 @@ Thanks for using Wickra! Here is where to get help, depending on what you need. Most questions are answered in the documentation: - **Docs site:** — quickstarts for Rust, Python, - Node.js, WebAssembly, C, C# and Go, a per-indicator reference, warmup periods, the + Node.js, WebAssembly, C, C#, Go and R, a per-indicator reference, warmup periods, the data layer, and an FAQ. - **README:** — installation and a quick overview. diff --git a/THREAT_MODEL.md b/THREAT_MODEL.md index 1ecbc14f..0cb2aeb5 100644 --- a/THREAT_MODEL.md +++ b/THREAT_MODEL.md @@ -4,7 +4,7 @@ This document describes Wickra's attack surface and the threats considered, together with their mitigations. It complements the security assurance case in [`SECURITY.md`](SECURITY.md). Wickra is a computational technical-analysis library (a Rust core with Python, Node.js and WebAssembly bindings plus a C ABI -and the .NET and Go bindings built on it), +and the .NET, Go and R bindings built on it), not a network service or trading system; the attack surface is correspondingly small. diff --git a/bindings/c/README.md b/bindings/c/README.md index 372e0323..c4e3ad1a 100644 --- a/bindings/c/README.md +++ b/bindings/c/README.md @@ -9,7 +9,7 @@ library plus a generated `wickra.h` — no system dependencies.** Wickra is a multi-language technical-analysis library with a Rust core and -bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go and any +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the **C ABI hub**: it compiles the diff --git a/bindings/csharp/README.md b/bindings/csharp/README.md index bf30f574..284780e3 100644 --- a/bindings/csharp/README.md +++ b/bindings/csharp/README.md @@ -9,7 +9,7 @@ prebuilt native library, no system dependencies.** Wickra is a multi-language technical-analysis library with a Rust core and -bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go and any +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the .NET binding; it consumes the diff --git a/bindings/node/README.md b/bindings/node/README.md index 8a61bcd1..4ebaa54a 100644 --- a/bindings/node/README.md +++ b/bindings/node/README.md @@ -9,7 +9,7 @@ prebuilt native binary, no system dependencies.** Wickra is a multi-language technical-analysis library with a Rust core and -bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go and any +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the Node.js binding (napi-rs); diff --git a/bindings/python/README.md b/bindings/python/README.md index 447a9c57..edb59b76 100644 --- a/bindings/python/README.md +++ b/bindings/python/README.md @@ -9,7 +9,7 @@ system dependencies, no C build tooling.** Wickra is a multi-language technical-analysis library with a Rust core and -bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go and any +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the Python binding (PyO3); it diff --git a/bindings/r/.Rbuildignore b/bindings/r/.Rbuildignore new file mode 100644 index 00000000..d6f0c1b2 --- /dev/null +++ b/bindings/r/.Rbuildignore @@ -0,0 +1,8 @@ +^src/wickra_abi\.dll$ +^src/wickra_abi\.def$ +^src/libwickra_abi\.dll\.a$ +^src/.*\.o$ +^src/wickra\.dll$ +^src/wickra\.so$ +^src/symbols\.rds$ +^\.gitignore$ diff --git a/bindings/r/DESCRIPTION b/bindings/r/DESCRIPTION new file mode 100644 index 00000000..18cdde59 --- /dev/null +++ b/bindings/r/DESCRIPTION @@ -0,0 +1,20 @@ +Package: wickra +Type: Package +Title: Streaming-First Technical Indicators +Version: 0.7.7 +Authors@R: person("Wickra contributors", role = c("aut", "cre"), email = "support@wickra.org") +Description: R bindings for the Wickra technical-analysis library over its C ABI + hub. Exposes 514 indicators, each an O(1) streaming state machine shared with + the Rust core and the other language bindings, so that live and historical + evaluation use the exact same implementation. +License: MIT + file LICENSE | Apache License 2.0 +URL: https://github.com/wickra-lib/wickra, https://docs.wickra.org +BugReports: https://github.com/wickra-lib/wickra/issues +Encoding: UTF-8 +NeedsCompilation: yes +SystemRequirements: the Wickra C ABI library (libwickra); set WICKRA_INCLUDE_DIR + and WICKRA_LIB_DIR when installing from source. +Roxygen: list(markdown = TRUE) +Suggests: testthat (>= 3.0.0) +Config/testthat/edition: 3 +Config/roxygen2/version: 8.0.0 diff --git a/bindings/r/LICENSE b/bindings/r/LICENSE new file mode 100644 index 00000000..58d8567b --- /dev/null +++ b/bindings/r/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2026 +COPYRIGHT HOLDER: Wickra contributors diff --git a/bindings/r/NAMESPACE b/bindings/r/NAMESPACE new file mode 100644 index 00000000..f5206111 --- /dev/null +++ b/bindings/r/NAMESPACE @@ -0,0 +1,522 @@ +# Generated by roxygen2: do not edit by hand + +S3method(batch,wickra_indicator) +S3method(reset,wickra_indicator) +S3method(update,wickra_indicator) +export(AbandonedBaby) +export(Abcd) +export(AbsoluteBreadthIndex) +export(AccelerationBands) +export(AcceleratorOscillator) +export(AdOscillator) +export(AdVolumeLine) +export(AdaptiveCci) +export(AdaptiveCycle) +export(AdaptiveLaguerreFilter) +export(AdaptiveRsi) +export(Adl) +export(AdvanceBlock) +export(AdvanceDecline) +export(AdvanceDeclineRatio) +export(Adx) +export(Adxr) +export(Alligator) +export(Alma) +export(Alpha) +export(AmihudIlliquidity) +export(AnchoredRsi) +export(AnchoredVwap) +export(AndrewsPitchfork) +export(Apo) +export(Aroon) +export(AroonOscillator) +export(Atr) +export(AtrBands) +export(AtrRatchet) +export(AtrTrailingStop) +export(AutoFib) +export(Autocorrelation) +export(AutocorrelationPeriodogram) +export(AverageDailyRange) +export(AverageDrawdown) +export(AvgPrice) +export(AwesomeOscillator) +export(AwesomeOscillatorHistogram) +export(BalanceOfPower) +export(BandpassFilter) +export(Bat) +export(BeltHold) +export(Beta) +export(BetaNeutralSpread) +export(BetterVolume) +export(BipowerVariation) +export(BodySizePct) +export(BollingerBands) +export(BollingerBandwidth) +export(BomarBands) +export(BreadthThrust) +export(Breakaway) +export(BullishPercentIndex) +export(BurkeRatio) +export(Butterfly) +export(CalendarSpread) +export(CalmarRatio) +export(Camarilla) +export(CandleVolume) +export(Cci) +export(CenterOfGravity) +export(CentralPivotRange) +export(Cfo) +export(ChaikinMoneyFlow) +export(ChaikinOscillator) +export(ChaikinVolatility) +export(ChandeKrollStop) +export(ChandelierExit) +export(ChoppinessIndex) +export(ClassicPivots) +export(CloseVsOpen) +export(ClosingMarubozu) +export(Cmo) +export(CoefficientOfVariation) +export(Cointegration) +export(CommonSenseRatio) +export(CompositeProfile) +export(ConcealingBabySwallow) +export(ConditionalValueAtRisk) +export(ConnorsRsi) +export(Coppock) +export(CorrelationTrendIndicator) +export(Counterattack) +export(Crab) +export(CumulativeVolumeDelta) +export(CumulativeVolumeIndex) +export(CupAndHandle) +export(CyberneticCycle) +export(Cypher) +export(DayOfWeekProfile) +export(Decycler) +export(DecyclerOscillator) +export(Dema) +export(DemandIndex) +export(DemarkPivots) +export(DepthSlope) +export(DerivativeOscillator) +export(DetrendedStdDev) +export(DisparityIndex) +export(DistanceSsd) +export(Doji) +export(DojiStar) +export(DollarBars) +export(Donchian) +export(DonchianStop) +export(DoubleBollinger) +export(DoubleTopBottom) +export(DownsideGapThreeMethods) +export(Dpo) +export(DragonflyDoji) +export(DrawdownDuration) +export(DumplingTop) +export(Dx) +export(DynamicMomentumIndex) +export(EaseOfMovement) +export(EffectiveSpread) +export(EhlersStochastic) +export(Ehma) +export(ElderImpulse) +export(ElderRay) +export(ElderSafeZone) +export(Ema) +export(EmpiricalModeDecomposition) +export(Engulfing) +export(Equivolume) +export(EstimatedLeverageRatio) +export(EvenBetterSinewave) +export(EveningDojiStar) +export(Evwma) +export(EwmaVolatility) +export(Expectancy) +export(FallingThreeMethods) +export(Fama) +export(FibArcs) +export(FibChannel) +export(FibConfluence) +export(FibExtension) +export(FibFan) +export(FibProjection) +export(FibRetracement) +export(FibTimeZones) +export(FibonacciPivots) +export(FisherRsi) +export(FisherTransform) +export(FlagPennant) +export(Footprint) +export(ForceIndex) +export(FractalChaosBands) +export(Frama) +export(FryPanBottom) +export(FundingBasis) +export(FundingImpliedApr) +export(FundingRate) +export(FundingRateMean) +export(FundingRateZScore) +export(GainLossRatio) +export(GainToPainRatio) +export(GapSideBySideWhite) +export(Garch11) +export(GarmanKlassVolatility) +export(Gartley) +export(GatorOscillator) +export(GeneralizedDema) +export(GeometricMa) +export(GoldenPocket) +export(GrangerCausality) +export(GravestoneDoji) +export(Hammer) +export(HangingMan) +export(Harami) +export(HaramiCross) +export(HasbrouckInformationShare) +export(HeadAndShoulders) +export(HeikinAshi) +export(HeikinAshiOscillator) +export(HiLoActivator) +export(HighLowIndex) +export(HighLowRange) +export(HighLowVolumeNodes) +export(HighWave) +export(HighpassFilter) +export(Hikkake) +export(HikkakeModified) +export(HilbertDominantCycle) +export(HistoricalVolatility) +export(Hma) +export(HoltWinters) +export(HomingPigeon) +export(HtDcPhase) +export(HtPhasor) +export(HtTrendMode) +export(HurstChannel) +export(HurstExponent) +export(Ichimoku) +export(IdenticalThreeCrows) +export(ImbalanceBars) +export(InNeck) +export(Inertia) +export(InformationRatio) +export(InitialBalance) +export(InstantaneousTrendline) +export(IntradayIntensity) +export(IntradayMomentumIndex) +export(IntradayVolatilityProfile) +export(InverseFisherTransform) +export(InvertedHammer) +export(JarqueBera) +export(Jma) +export(JumpIndicator) +export(KRatio) +export(KagiBars) +export(KalmanHedgeRatio) +export(Kama) +export(KaseDevStop) +export(KasePermissionStochastic) +export(KellyCriterion) +export(Keltner) +export(KendallTau) +export(Kicking) +export(KickingByLength) +export(Kst) +export(Kurtosis) +export(Kvo) +export(KylesLambda) +export(LadderBottom) +export(LaguerreRsi) +export(LeadLagCrossCorrelation) +export(LinRegAngle) +export(LinRegChannel) +export(LinRegIntercept) +export(LinRegSlope) +export(LinearRegression) +export(LiquidationFeatures) +export(LogReturn) +export(LongLeggedDoji) +export(LongLine) +export(LongShortRatio) +export(M2Measure) +export(MaEnvelope) +export(MacdExt) +export(MacdFix) +export(MacdHistogram) +export(MacdIndicator) +export(Mama) +export(MarketFacilitationIndex) +export(MartinRatio) +export(Marubozu) +export(MassIndex) +export(MatHold) +export(MatchingLow) +export(MaxDrawdown) +export(McClellanOscillator) +export(McClellanSummationIndex) +export(McGinleyDynamic) +export(MedianAbsoluteDeviation) +export(MedianChannel) +export(MedianMa) +export(MedianPrice) +export(Mfi) +export(Microprice) +export(MidPoint) +export(MidPrice) +export(MinusDi) +export(MinusDm) +export(ModifiedMaStop) +export(Mom) +export(MorningDojiStar) +export(MorningEveningStar) +export(MurreyMathLines) +export(NakedPoc) +export(Natr) +export(NewHighsNewLows) +export(NewPriceLines) +export(Nrtr) +export(Nvi) +export(OIPriceDivergence) +export(OIWeighted) +export(Obv) +export(OiToVolumeRatio) +export(OmegaRatio) +export(OnNeck) +export(OpenInterestDelta) +export(OpenInterestMomentum) +export(OpeningMarubozu) +export(OpeningRange) +export(OrderBookImbalanceFull) +export(OrderBookImbalanceTop1) +export(OrderBookImbalanceTopN) +export(OrderFlowImbalance) +export(OuHalfLife) +export(OvernightGap) +export(OvernightIntradayReturn) +export(PainIndex) +export(PairSpreadZScore) +export(PairwiseBeta) +export(ParkinsonVolatility) +export(PearsonCorrelation) +export(PercentAboveMa) +export(PercentB) +export(PercentageTrailingStop) +export(PerpetualPremiumIndex) +export(Pgo) +export(PiercingDarkCloud) +export(Pin) +export(PivotReversal) +export(PlusDi) +export(PlusDm) +export(Pmo) +export(PointAndFigureBars) +export(PolarizedFractalEfficiency) +export(Ppo) +export(PpoHistogram) +export(ProfileShape) +export(ProfitFactor) +export(ProjectionBands) +export(ProjectionOscillator) +export(Psar) +export(Pvi) +export(Qqe) +export(Qstick) +export(QuartileBands) +export(QuotedSpread) +export(RSquared) +export(RangeBars) +export(RealizedSpread) +export(RealizedVolatility) +export(RecoveryFactor) +export(RectangleRange) +export(Reflex) +export(RegimeLabel) +export(RelativeStrengthAB) +export(RenkoBars) +export(RenkoTrailingStop) +export(RickshawMan) +export(RisingThreeMethods) +export(Rmi) +export(Roc) +export(Rocp) +export(Rocr) +export(Rocr100) +export(RogersSatchellVolatility) +export(RollMeasure) +export(RollingCorrelation) +export(RollingCovariance) +export(RollingIqr) +export(RollingMinMaxScaler) +export(RollingPercentileRank) +export(RollingQuantile) +export(RollingVwap) +export(RoofingFilter) +export(Rsi) +export(Rsx) +export(RunBars) +export(Rvi) +export(RviVolatility) +export(Rwi) +export(SampleEntropy) +export(SarExt) +export(SeasonalZScore) +export(SeparatingLines) +export(SessionHighLow) +export(SessionRange) +export(SessionVwap) +export(ShannonEntropy) +export(Shark) +export(SharpeRatio) +export(ShootingStar) +export(ShortLine) +export(SignedVolume) +export(SineWave) +export(SineWeightedMa) +export(SinglePrints) +export(Skewness) +export(Sma) +export(Smi) +export(Smma) +export(SmoothedHeikinAshi) +export(SortinoRatio) +export(SpearmanCorrelation) +export(SpinningTop) +export(SpreadAr1Coefficient) +export(SpreadBollingerBands) +export(SpreadHurst) +export(StalledPattern) +export(StandardError) +export(StandardErrorBands) +export(StarcBands) +export(Stc) +export(StdDev) +export(StepTrailingStop) +export(SterlingRatio) +export(StickSandwich) +export(StochRsi) +export(Stochastic) +export(StochasticCci) +export(SuperSmoother) +export(SuperTrend) +export(T3) +export(TailRatio) +export(TakerBuySellRatio) +export(Takuri) +export(TasukiGap) +export(TdCamouflage) +export(TdClop) +export(TdClopwin) +export(TdCombo) +export(TdCountdown) +export(TdDWave) +export(TdDeMarker) +export(TdDifferential) +export(TdLines) +export(TdMovingAverage) +export(TdOpen) +export(TdPressure) +export(TdPropulsion) +export(TdRangeProjection) +export(TdRei) +export(TdRiskLevel) +export(TdSequential) +export(TdSetup) +export(TdTrap) +export(Tema) +export(TermStructureBasis) +export(ThreeDrives) +export(ThreeInside) +export(ThreeLineBreak) +export(ThreeLineBreakBars) +export(ThreeLineStrike) +export(ThreeOutside) +export(ThreeSoldiersOrCrows) +export(ThreeStarsInSouth) +export(Thrusting) +export(TickBars) +export(TickIndex) +export(Tii) +export(TimeBasedStop) +export(TimeOfDayReturnProfile) +export(TowerTopBottom) +export(TpoProfile) +export(TradeImbalance) +export(TradeSignAutocorrelation) +export(TradeVolumeIndex) +export(TrendLabel) +export(TrendStrengthIndex) +export(Trendflex) +export(TreynorRatio) +export(Triangle) +export(Trima) +export(Trin) +export(TripleTopBottom) +export(Tristar) +export(Trix) +export(TrueRange) +export(Tsf) +export(TsfOscillator) +export(Tsi) +export(Tsv) +export(TtmSqueeze) +export(TtmTrend) +export(TurnOfMonth) +export(Tweezer) +export(TwiggsMoneyFlow) +export(TwoCrows) +export(TypicalPrice) +export(UlcerIndex) +export(UltimateOscillator) +export(UniqueThreeRiver) +export(UniversalOscillator) +export(UpDownVolumeRatio) +export(UpsideGapThreeMethods) +export(UpsideGapTwoCrows) +export(UpsidePotentialRatio) +export(ValueArea) +export(ValueAtRisk) +export(Variance) +export(VarianceRatio) +export(VerticalHorizontalFilter) +export(Vidya) +export(VolatilityCone) +export(VolatilityOfVolatility) +export(VolatilityRatio) +export(VoltyStop) +export(VolumeBars) +export(VolumeByTimeProfile) +export(VolumeOscillator) +export(VolumePriceTrend) +export(VolumeProfile) +export(VolumeRsi) +export(VolumeWeightedMacd) +export(VolumeWeightedSr) +export(Vortex) +export(Vpin) +export(Vwap) +export(VwapStdDevBands) +export(Vwma) +export(Vzo) +export(Wad) +export(WavePm) +export(WaveTrend) +export(Wedge) +export(WeightedClose) +export(WickRatio) +export(WilliamsFractals) +export(WilliamsR) +export(WinRate) +export(Wma) +export(WoodiePivots) +export(YangZhangVolatility) +export(YoyoExit) +export(ZScore) +export(ZeroLagMacd) +export(ZigZag) +export(Zlema) +export(batch) +export(reset) +importFrom(stats,update) diff --git a/bindings/r/R/indicators.R b/bindings/r/R/indicators.R new file mode 100644 index 00000000..6271f7fd --- /dev/null +++ b/bindings/r/R/indicators.R @@ -0,0 +1,4121 @@ +# Generated from bindings/c/include/wickra.h. DO NOT EDIT. + +# Internal: build an S3 wickra_indicator object holding the external +# pointer (handle, auto-freed by a C finalizer) and the C-symbol prefix. +.wk_obj <- function(prefix, ptr, cls, values_cap = NA_integer_) { + structure(list(ptr = ptr, prefix = prefix, values_cap = values_cap), + class = c(cls, "wickra_indicator")) +} + +#' AbandonedBaby indicator +#' @keywords internal +#' @export +AbandonedBaby <- function() { + ptr <- .Call("wk_abandoned_baby_new", PACKAGE = "wickra") + .wk_obj("abandoned_baby", ptr, "AbandonedBaby") +} + +#' Abcd indicator +#' @keywords internal +#' @export +Abcd <- function() { + ptr <- .Call("wk_abcd_new", PACKAGE = "wickra") + .wk_obj("abcd", ptr, "Abcd") +} + +#' AbsoluteBreadthIndex indicator +#' @keywords internal +#' @export +AbsoluteBreadthIndex <- function() { + ptr <- .Call("wk_absolute_breadth_index_new", PACKAGE = "wickra") + .wk_obj("absolute_breadth_index", ptr, "AbsoluteBreadthIndex") +} + +#' AccelerationBands indicator +#' @keywords internal +#' @export +AccelerationBands <- function(period, factor) { + ptr <- .Call("wk_acceleration_bands_new", period, factor, PACKAGE = "wickra") + .wk_obj("acceleration_bands", ptr, "AccelerationBands") +} + +#' AcceleratorOscillator indicator +#' @keywords internal +#' @export +AcceleratorOscillator <- function(ao_fast, ao_slow, signal_period) { + ptr <- .Call("wk_accelerator_oscillator_new", ao_fast, ao_slow, signal_period, PACKAGE = "wickra") + .wk_obj("accelerator_oscillator", ptr, "AcceleratorOscillator") +} + +#' AdOscillator indicator +#' @keywords internal +#' @export +AdOscillator <- function() { + ptr <- .Call("wk_ad_oscillator_new", PACKAGE = "wickra") + .wk_obj("ad_oscillator", ptr, "AdOscillator") +} + +#' AdVolumeLine indicator +#' @keywords internal +#' @export +AdVolumeLine <- function() { + ptr <- .Call("wk_ad_volume_line_new", PACKAGE = "wickra") + .wk_obj("ad_volume_line", ptr, "AdVolumeLine") +} + +#' AdaptiveCci indicator +#' @keywords internal +#' @export +AdaptiveCci <- function(period) { + ptr <- .Call("wk_adaptive_cci_new", period, PACKAGE = "wickra") + .wk_obj("adaptive_cci", ptr, "AdaptiveCci") +} + +#' AdaptiveCycle indicator +#' @keywords internal +#' @export +AdaptiveCycle <- function() { + ptr <- .Call("wk_adaptive_cycle_new", PACKAGE = "wickra") + .wk_obj("adaptive_cycle", ptr, "AdaptiveCycle") +} + +#' AdaptiveLaguerreFilter indicator +#' @keywords internal +#' @export +AdaptiveLaguerreFilter <- function(period) { + ptr <- .Call("wk_adaptive_laguerre_filter_new", period, PACKAGE = "wickra") + .wk_obj("adaptive_laguerre_filter", ptr, "AdaptiveLaguerreFilter") +} + +#' AdaptiveRsi indicator +#' @keywords internal +#' @export +AdaptiveRsi <- function(period) { + ptr <- .Call("wk_adaptive_rsi_new", period, PACKAGE = "wickra") + .wk_obj("adaptive_rsi", ptr, "AdaptiveRsi") +} + +#' Adl indicator +#' @keywords internal +#' @export +Adl <- function() { + ptr <- .Call("wk_adl_new", PACKAGE = "wickra") + .wk_obj("adl", ptr, "Adl") +} + +#' AdvanceBlock indicator +#' @keywords internal +#' @export +AdvanceBlock <- function() { + ptr <- .Call("wk_advance_block_new", PACKAGE = "wickra") + .wk_obj("advance_block", ptr, "AdvanceBlock") +} + +#' AdvanceDecline indicator +#' @keywords internal +#' @export +AdvanceDecline <- function() { + ptr <- .Call("wk_advance_decline_new", PACKAGE = "wickra") + .wk_obj("advance_decline", ptr, "AdvanceDecline") +} + +#' AdvanceDeclineRatio indicator +#' @keywords internal +#' @export +AdvanceDeclineRatio <- function() { + ptr <- .Call("wk_advance_decline_ratio_new", PACKAGE = "wickra") + .wk_obj("advance_decline_ratio", ptr, "AdvanceDeclineRatio") +} + +#' Adx indicator +#' @keywords internal +#' @export +Adx <- function(period) { + ptr <- .Call("wk_adx_new", period, PACKAGE = "wickra") + .wk_obj("adx", ptr, "Adx") +} + +#' Adxr indicator +#' @keywords internal +#' @export +Adxr <- function(period) { + ptr <- .Call("wk_adxr_new", period, PACKAGE = "wickra") + .wk_obj("adxr", ptr, "Adxr") +} + +#' Alligator indicator +#' @keywords internal +#' @export +Alligator <- function(jaw_period, teeth_period, lips_period) { + ptr <- .Call("wk_alligator_new", jaw_period, teeth_period, lips_period, PACKAGE = "wickra") + .wk_obj("alligator", ptr, "Alligator") +} + +#' Alma indicator +#' @keywords internal +#' @export +Alma <- function(period, offset, sigma) { + ptr <- .Call("wk_alma_new", period, offset, sigma, PACKAGE = "wickra") + .wk_obj("alma", ptr, "Alma") +} + +#' Alpha indicator +#' @keywords internal +#' @export +Alpha <- function(period, risk_free) { + ptr <- .Call("wk_alpha_new", period, risk_free, PACKAGE = "wickra") + .wk_obj("alpha", ptr, "Alpha") +} + +#' AmihudIlliquidity indicator +#' @keywords internal +#' @export +AmihudIlliquidity <- function(period) { + ptr <- .Call("wk_amihud_illiquidity_new", period, PACKAGE = "wickra") + .wk_obj("amihud_illiquidity", ptr, "AmihudIlliquidity") +} + +#' AnchoredRsi indicator +#' @keywords internal +#' @export +AnchoredRsi <- function() { + ptr <- .Call("wk_anchored_rsi_new", PACKAGE = "wickra") + .wk_obj("anchored_rsi", ptr, "AnchoredRsi") +} + +#' AnchoredVwap indicator +#' @keywords internal +#' @export +AnchoredVwap <- function() { + ptr <- .Call("wk_anchored_vwap_new", PACKAGE = "wickra") + .wk_obj("anchored_vwap", ptr, "AnchoredVwap") +} + +#' AndrewsPitchfork indicator +#' @keywords internal +#' @export +AndrewsPitchfork <- function(strength) { + ptr <- .Call("wk_andrews_pitchfork_new", strength, PACKAGE = "wickra") + .wk_obj("andrews_pitchfork", ptr, "AndrewsPitchfork") +} + +#' Apo indicator +#' @keywords internal +#' @export +Apo <- function(fast, slow) { + ptr <- .Call("wk_apo_new", fast, slow, PACKAGE = "wickra") + .wk_obj("apo", ptr, "Apo") +} + +#' Aroon indicator +#' @keywords internal +#' @export +Aroon <- function(period) { + ptr <- .Call("wk_aroon_new", period, PACKAGE = "wickra") + .wk_obj("aroon", ptr, "Aroon") +} + +#' AroonOscillator indicator +#' @keywords internal +#' @export +AroonOscillator <- function(period) { + ptr <- .Call("wk_aroon_oscillator_new", period, PACKAGE = "wickra") + .wk_obj("aroon_oscillator", ptr, "AroonOscillator") +} + +#' Atr indicator +#' @keywords internal +#' @export +Atr <- function(period) { + ptr <- .Call("wk_atr_new", period, PACKAGE = "wickra") + .wk_obj("atr", ptr, "Atr") +} + +#' AtrBands indicator +#' @keywords internal +#' @export +AtrBands <- function(period, multiplier) { + ptr <- .Call("wk_atr_bands_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("atr_bands", ptr, "AtrBands") +} + +#' AtrRatchet indicator +#' @keywords internal +#' @export +AtrRatchet <- function(atr_period, start_mult, increment) { + ptr <- .Call("wk_atr_ratchet_new", atr_period, start_mult, increment, PACKAGE = "wickra") + .wk_obj("atr_ratchet", ptr, "AtrRatchet") +} + +#' AtrTrailingStop indicator +#' @keywords internal +#' @export +AtrTrailingStop <- function(atr_period, multiplier) { + ptr <- .Call("wk_atr_trailing_stop_new", atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("atr_trailing_stop", ptr, "AtrTrailingStop") +} + +#' AutoFib indicator +#' @keywords internal +#' @export +AutoFib <- function() { + ptr <- .Call("wk_auto_fib_new", PACKAGE = "wickra") + .wk_obj("auto_fib", ptr, "AutoFib") +} + +#' Autocorrelation indicator +#' @keywords internal +#' @export +Autocorrelation <- function(period, lag) { + ptr <- .Call("wk_autocorrelation_new", period, lag, PACKAGE = "wickra") + .wk_obj("autocorrelation", ptr, "Autocorrelation") +} + +#' AutocorrelationPeriodogram indicator +#' @keywords internal +#' @export +AutocorrelationPeriodogram <- function(min_period, max_period) { + ptr <- .Call("wk_autocorrelation_periodogram_new", min_period, max_period, PACKAGE = "wickra") + .wk_obj("autocorrelation_periodogram", ptr, "AutocorrelationPeriodogram") +} + +#' AverageDailyRange indicator +#' @keywords internal +#' @export +AverageDailyRange <- function(period, utc_offset_minutes) { + ptr <- .Call("wk_average_daily_range_new", period, utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("average_daily_range", ptr, "AverageDailyRange") +} + +#' AverageDrawdown indicator +#' @keywords internal +#' @export +AverageDrawdown <- function(period) { + ptr <- .Call("wk_average_drawdown_new", period, PACKAGE = "wickra") + .wk_obj("average_drawdown", ptr, "AverageDrawdown") +} + +#' AvgPrice indicator +#' @keywords internal +#' @export +AvgPrice <- function() { + ptr <- .Call("wk_avg_price_new", PACKAGE = "wickra") + .wk_obj("avg_price", ptr, "AvgPrice") +} + +#' AwesomeOscillator indicator +#' @keywords internal +#' @export +AwesomeOscillator <- function(fast, slow) { + ptr <- .Call("wk_awesome_oscillator_new", fast, slow, PACKAGE = "wickra") + .wk_obj("awesome_oscillator", ptr, "AwesomeOscillator") +} + +#' AwesomeOscillatorHistogram indicator +#' @keywords internal +#' @export +AwesomeOscillatorHistogram <- function(fast, slow, sma_period) { + ptr <- .Call("wk_awesome_oscillator_histogram_new", fast, slow, sma_period, PACKAGE = "wickra") + .wk_obj("awesome_oscillator_histogram", ptr, "AwesomeOscillatorHistogram") +} + +#' BalanceOfPower indicator +#' @keywords internal +#' @export +BalanceOfPower <- function() { + ptr <- .Call("wk_balance_of_power_new", PACKAGE = "wickra") + .wk_obj("balance_of_power", ptr, "BalanceOfPower") +} + +#' BandpassFilter indicator +#' @keywords internal +#' @export +BandpassFilter <- function(period, bandwidth) { + ptr <- .Call("wk_bandpass_filter_new", period, bandwidth, PACKAGE = "wickra") + .wk_obj("bandpass_filter", ptr, "BandpassFilter") +} + +#' Bat indicator +#' @keywords internal +#' @export +Bat <- function() { + ptr <- .Call("wk_bat_new", PACKAGE = "wickra") + .wk_obj("bat", ptr, "Bat") +} + +#' BeltHold indicator +#' @keywords internal +#' @export +BeltHold <- function() { + ptr <- .Call("wk_belt_hold_new", PACKAGE = "wickra") + .wk_obj("belt_hold", ptr, "BeltHold") +} + +#' Beta indicator +#' @keywords internal +#' @export +Beta <- function(period) { + ptr <- .Call("wk_beta_new", period, PACKAGE = "wickra") + .wk_obj("beta", ptr, "Beta") +} + +#' BetaNeutralSpread indicator +#' @keywords internal +#' @export +BetaNeutralSpread <- function(period) { + ptr <- .Call("wk_beta_neutral_spread_new", period, PACKAGE = "wickra") + .wk_obj("beta_neutral_spread", ptr, "BetaNeutralSpread") +} + +#' BetterVolume indicator +#' @keywords internal +#' @export +BetterVolume <- function(period) { + ptr <- .Call("wk_better_volume_new", period, PACKAGE = "wickra") + .wk_obj("better_volume", ptr, "BetterVolume") +} + +#' BipowerVariation indicator +#' @keywords internal +#' @export +BipowerVariation <- function(period) { + ptr <- .Call("wk_bipower_variation_new", period, PACKAGE = "wickra") + .wk_obj("bipower_variation", ptr, "BipowerVariation") +} + +#' BodySizePct indicator +#' @keywords internal +#' @export +BodySizePct <- function() { + ptr <- .Call("wk_body_size_pct_new", PACKAGE = "wickra") + .wk_obj("body_size_pct", ptr, "BodySizePct") +} + +#' BollingerBands indicator +#' @keywords internal +#' @export +BollingerBands <- function(period, multiplier) { + ptr <- .Call("wk_bollinger_bands_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("bollinger_bands", ptr, "BollingerBands") +} + +#' BollingerBandwidth indicator +#' @keywords internal +#' @export +BollingerBandwidth <- function(period, multiplier) { + ptr <- .Call("wk_bollinger_bandwidth_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("bollinger_bandwidth", ptr, "BollingerBandwidth") +} + +#' BomarBands indicator +#' @keywords internal +#' @export +BomarBands <- function(period, coverage) { + ptr <- .Call("wk_bomar_bands_new", period, coverage, PACKAGE = "wickra") + .wk_obj("bomar_bands", ptr, "BomarBands") +} + +#' BreadthThrust indicator +#' @keywords internal +#' @export +BreadthThrust <- function(period) { + ptr <- .Call("wk_breadth_thrust_new", period, PACKAGE = "wickra") + .wk_obj("breadth_thrust", ptr, "BreadthThrust") +} + +#' Breakaway indicator +#' @keywords internal +#' @export +Breakaway <- function() { + ptr <- .Call("wk_breakaway_new", PACKAGE = "wickra") + .wk_obj("breakaway", ptr, "Breakaway") +} + +#' BullishPercentIndex indicator +#' @keywords internal +#' @export +BullishPercentIndex <- function() { + ptr <- .Call("wk_bullish_percent_index_new", PACKAGE = "wickra") + .wk_obj("bullish_percent_index", ptr, "BullishPercentIndex") +} + +#' BurkeRatio indicator +#' @keywords internal +#' @export +BurkeRatio <- function(period) { + ptr <- .Call("wk_burke_ratio_new", period, PACKAGE = "wickra") + .wk_obj("burke_ratio", ptr, "BurkeRatio") +} + +#' Butterfly indicator +#' @keywords internal +#' @export +Butterfly <- function() { + ptr <- .Call("wk_butterfly_new", PACKAGE = "wickra") + .wk_obj("butterfly", ptr, "Butterfly") +} + +#' CalendarSpread indicator +#' @keywords internal +#' @export +CalendarSpread <- function() { + ptr <- .Call("wk_calendar_spread_new", PACKAGE = "wickra") + .wk_obj("calendar_spread", ptr, "CalendarSpread") +} + +#' CalmarRatio indicator +#' @keywords internal +#' @export +CalmarRatio <- function(period) { + ptr <- .Call("wk_calmar_ratio_new", period, PACKAGE = "wickra") + .wk_obj("calmar_ratio", ptr, "CalmarRatio") +} + +#' Camarilla indicator +#' @keywords internal +#' @export +Camarilla <- function() { + ptr <- .Call("wk_camarilla_new", PACKAGE = "wickra") + .wk_obj("camarilla", ptr, "Camarilla") +} + +#' CandleVolume indicator +#' @keywords internal +#' @export +CandleVolume <- function(period) { + ptr <- .Call("wk_candle_volume_new", period, PACKAGE = "wickra") + .wk_obj("candle_volume", ptr, "CandleVolume") +} + +#' Cci indicator +#' @keywords internal +#' @export +Cci <- function(period) { + ptr <- .Call("wk_cci_new", period, PACKAGE = "wickra") + .wk_obj("cci", ptr, "Cci") +} + +#' CenterOfGravity indicator +#' @keywords internal +#' @export +CenterOfGravity <- function(period) { + ptr <- .Call("wk_center_of_gravity_new", period, PACKAGE = "wickra") + .wk_obj("center_of_gravity", ptr, "CenterOfGravity") +} + +#' CentralPivotRange indicator +#' @keywords internal +#' @export +CentralPivotRange <- function() { + ptr <- .Call("wk_central_pivot_range_new", PACKAGE = "wickra") + .wk_obj("central_pivot_range", ptr, "CentralPivotRange") +} + +#' Cfo indicator +#' @keywords internal +#' @export +Cfo <- function(period) { + ptr <- .Call("wk_cfo_new", period, PACKAGE = "wickra") + .wk_obj("cfo", ptr, "Cfo") +} + +#' ChaikinMoneyFlow indicator +#' @keywords internal +#' @export +ChaikinMoneyFlow <- function(period) { + ptr <- .Call("wk_chaikin_money_flow_new", period, PACKAGE = "wickra") + .wk_obj("chaikin_money_flow", ptr, "ChaikinMoneyFlow") +} + +#' ChaikinOscillator indicator +#' @keywords internal +#' @export +ChaikinOscillator <- function(fast, slow) { + ptr <- .Call("wk_chaikin_oscillator_new", fast, slow, PACKAGE = "wickra") + .wk_obj("chaikin_oscillator", ptr, "ChaikinOscillator") +} + +#' ChaikinVolatility indicator +#' @keywords internal +#' @export +ChaikinVolatility <- function(ema_period, roc_period) { + ptr <- .Call("wk_chaikin_volatility_new", ema_period, roc_period, PACKAGE = "wickra") + .wk_obj("chaikin_volatility", ptr, "ChaikinVolatility") +} + +#' ChandeKrollStop indicator +#' @keywords internal +#' @export +ChandeKrollStop <- function(atr_period, atr_multiplier, stop_period) { + ptr <- .Call("wk_chande_kroll_stop_new", atr_period, atr_multiplier, stop_period, PACKAGE = "wickra") + .wk_obj("chande_kroll_stop", ptr, "ChandeKrollStop") +} + +#' ChandelierExit indicator +#' @keywords internal +#' @export +ChandelierExit <- function(period, multiplier) { + ptr <- .Call("wk_chandelier_exit_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("chandelier_exit", ptr, "ChandelierExit") +} + +#' ChoppinessIndex indicator +#' @keywords internal +#' @export +ChoppinessIndex <- function(period) { + ptr <- .Call("wk_choppiness_index_new", period, PACKAGE = "wickra") + .wk_obj("choppiness_index", ptr, "ChoppinessIndex") +} + +#' ClassicPivots indicator +#' @keywords internal +#' @export +ClassicPivots <- function() { + ptr <- .Call("wk_classic_pivots_new", PACKAGE = "wickra") + .wk_obj("classic_pivots", ptr, "ClassicPivots") +} + +#' CloseVsOpen indicator +#' @keywords internal +#' @export +CloseVsOpen <- function() { + ptr <- .Call("wk_close_vs_open_new", PACKAGE = "wickra") + .wk_obj("close_vs_open", ptr, "CloseVsOpen") +} + +#' ClosingMarubozu indicator +#' @keywords internal +#' @export +ClosingMarubozu <- function() { + ptr <- .Call("wk_closing_marubozu_new", PACKAGE = "wickra") + .wk_obj("closing_marubozu", ptr, "ClosingMarubozu") +} + +#' Cmo indicator +#' @keywords internal +#' @export +Cmo <- function(period) { + ptr <- .Call("wk_cmo_new", period, PACKAGE = "wickra") + .wk_obj("cmo", ptr, "Cmo") +} + +#' CoefficientOfVariation indicator +#' @keywords internal +#' @export +CoefficientOfVariation <- function(period) { + ptr <- .Call("wk_coefficient_of_variation_new", period, PACKAGE = "wickra") + .wk_obj("coefficient_of_variation", ptr, "CoefficientOfVariation") +} + +#' Cointegration indicator +#' @keywords internal +#' @export +Cointegration <- function(period, adf_lags) { + ptr <- .Call("wk_cointegration_new", period, adf_lags, PACKAGE = "wickra") + .wk_obj("cointegration", ptr, "Cointegration") +} + +#' CommonSenseRatio indicator +#' @keywords internal +#' @export +CommonSenseRatio <- function(period) { + ptr <- .Call("wk_common_sense_ratio_new", period, PACKAGE = "wickra") + .wk_obj("common_sense_ratio", ptr, "CommonSenseRatio") +} + +#' CompositeProfile indicator +#' @keywords internal +#' @export +CompositeProfile <- function(period, bins, value_area_pct) { + ptr <- .Call("wk_composite_profile_new", period, bins, value_area_pct, PACKAGE = "wickra") + .wk_obj("composite_profile", ptr, "CompositeProfile") +} + +#' ConcealingBabySwallow indicator +#' @keywords internal +#' @export +ConcealingBabySwallow <- function() { + ptr <- .Call("wk_concealing_baby_swallow_new", PACKAGE = "wickra") + .wk_obj("concealing_baby_swallow", ptr, "ConcealingBabySwallow") +} + +#' ConditionalValueAtRisk indicator +#' @keywords internal +#' @export +ConditionalValueAtRisk <- function(period, confidence) { + ptr <- .Call("wk_conditional_value_at_risk_new", period, confidence, PACKAGE = "wickra") + .wk_obj("conditional_value_at_risk", ptr, "ConditionalValueAtRisk") +} + +#' ConnorsRsi indicator +#' @keywords internal +#' @export +ConnorsRsi <- function(period_rsi, period_streak, period_rank) { + ptr <- .Call("wk_connors_rsi_new", period_rsi, period_streak, period_rank, PACKAGE = "wickra") + .wk_obj("connors_rsi", ptr, "ConnorsRsi") +} + +#' Coppock indicator +#' @keywords internal +#' @export +Coppock <- function(roc_long_period, roc_short_period, wma_period) { + ptr <- .Call("wk_coppock_new", roc_long_period, roc_short_period, wma_period, PACKAGE = "wickra") + .wk_obj("coppock", ptr, "Coppock") +} + +#' CorrelationTrendIndicator indicator +#' @keywords internal +#' @export +CorrelationTrendIndicator <- function(period) { + ptr <- .Call("wk_correlation_trend_indicator_new", period, PACKAGE = "wickra") + .wk_obj("correlation_trend_indicator", ptr, "CorrelationTrendIndicator") +} + +#' Counterattack indicator +#' @keywords internal +#' @export +Counterattack <- function() { + ptr <- .Call("wk_counterattack_new", PACKAGE = "wickra") + .wk_obj("counterattack", ptr, "Counterattack") +} + +#' Crab indicator +#' @keywords internal +#' @export +Crab <- function() { + ptr <- .Call("wk_crab_new", PACKAGE = "wickra") + .wk_obj("crab", ptr, "Crab") +} + +#' CumulativeVolumeDelta indicator +#' @keywords internal +#' @export +CumulativeVolumeDelta <- function() { + ptr <- .Call("wk_cumulative_volume_delta_new", PACKAGE = "wickra") + .wk_obj("cumulative_volume_delta", ptr, "CumulativeVolumeDelta") +} + +#' CumulativeVolumeIndex indicator +#' @keywords internal +#' @export +CumulativeVolumeIndex <- function() { + ptr <- .Call("wk_cumulative_volume_index_new", PACKAGE = "wickra") + .wk_obj("cumulative_volume_index", ptr, "CumulativeVolumeIndex") +} + +#' CupAndHandle indicator +#' @keywords internal +#' @export +CupAndHandle <- function() { + ptr <- .Call("wk_cup_and_handle_new", PACKAGE = "wickra") + .wk_obj("cup_and_handle", ptr, "CupAndHandle") +} + +#' CyberneticCycle indicator +#' @keywords internal +#' @export +CyberneticCycle <- function(period) { + ptr <- .Call("wk_cybernetic_cycle_new", period, PACKAGE = "wickra") + .wk_obj("cybernetic_cycle", ptr, "CyberneticCycle") +} + +#' Cypher indicator +#' @keywords internal +#' @export +Cypher <- function() { + ptr <- .Call("wk_cypher_new", PACKAGE = "wickra") + .wk_obj("cypher", ptr, "Cypher") +} + +#' DayOfWeekProfile indicator +#' @keywords internal +#' @export +DayOfWeekProfile <- function(utc_offset_minutes) { + ptr <- .Call("wk_day_of_week_profile_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("day_of_week_profile", ptr, "DayOfWeekProfile", values_cap = as.integer(4096L)) +} + +#' Decycler indicator +#' @keywords internal +#' @export +Decycler <- function(period) { + ptr <- .Call("wk_decycler_new", period, PACKAGE = "wickra") + .wk_obj("decycler", ptr, "Decycler") +} + +#' DecyclerOscillator indicator +#' @keywords internal +#' @export +DecyclerOscillator <- function(fast, slow) { + ptr <- .Call("wk_decycler_oscillator_new", fast, slow, PACKAGE = "wickra") + .wk_obj("decycler_oscillator", ptr, "DecyclerOscillator") +} + +#' Dema indicator +#' @keywords internal +#' @export +Dema <- function(period) { + ptr <- .Call("wk_dema_new", period, PACKAGE = "wickra") + .wk_obj("dema", ptr, "Dema") +} + +#' DemandIndex indicator +#' @keywords internal +#' @export +DemandIndex <- function(period) { + ptr <- .Call("wk_demand_index_new", period, PACKAGE = "wickra") + .wk_obj("demand_index", ptr, "DemandIndex") +} + +#' DemarkPivots indicator +#' @keywords internal +#' @export +DemarkPivots <- function() { + ptr <- .Call("wk_demark_pivots_new", PACKAGE = "wickra") + .wk_obj("demark_pivots", ptr, "DemarkPivots") +} + +#' DepthSlope indicator +#' @keywords internal +#' @export +DepthSlope <- function() { + ptr <- .Call("wk_depth_slope_new", PACKAGE = "wickra") + .wk_obj("depth_slope", ptr, "DepthSlope") +} + +#' DerivativeOscillator indicator +#' @keywords internal +#' @export +DerivativeOscillator <- function(rsi_period, smooth1, smooth2, signal_period) { + ptr <- .Call("wk_derivative_oscillator_new", rsi_period, smooth1, smooth2, signal_period, PACKAGE = "wickra") + .wk_obj("derivative_oscillator", ptr, "DerivativeOscillator") +} + +#' DetrendedStdDev indicator +#' @keywords internal +#' @export +DetrendedStdDev <- function(period) { + ptr <- .Call("wk_detrended_std_dev_new", period, PACKAGE = "wickra") + .wk_obj("detrended_std_dev", ptr, "DetrendedStdDev") +} + +#' DisparityIndex indicator +#' @keywords internal +#' @export +DisparityIndex <- function(period) { + ptr <- .Call("wk_disparity_index_new", period, PACKAGE = "wickra") + .wk_obj("disparity_index", ptr, "DisparityIndex") +} + +#' DistanceSsd indicator +#' @keywords internal +#' @export +DistanceSsd <- function(period) { + ptr <- .Call("wk_distance_ssd_new", period, PACKAGE = "wickra") + .wk_obj("distance_ssd", ptr, "DistanceSsd") +} + +#' Doji indicator +#' @keywords internal +#' @export +Doji <- function() { + ptr <- .Call("wk_doji_new", PACKAGE = "wickra") + .wk_obj("doji", ptr, "Doji") +} + +#' DojiStar indicator +#' @keywords internal +#' @export +DojiStar <- function() { + ptr <- .Call("wk_doji_star_new", PACKAGE = "wickra") + .wk_obj("doji_star", ptr, "DojiStar") +} + +#' DollarBars indicator +#' @keywords internal +#' @export +DollarBars <- function(dollar_per_bar) { + ptr <- .Call("wk_dollar_bars_new", dollar_per_bar, PACKAGE = "wickra") + .wk_obj("dollar_bars", ptr, "DollarBars") +} + +#' Donchian indicator +#' @keywords internal +#' @export +Donchian <- function(period) { + ptr <- .Call("wk_donchian_new", period, PACKAGE = "wickra") + .wk_obj("donchian", ptr, "Donchian") +} + +#' DonchianStop indicator +#' @keywords internal +#' @export +DonchianStop <- function(period) { + ptr <- .Call("wk_donchian_stop_new", period, PACKAGE = "wickra") + .wk_obj("donchian_stop", ptr, "DonchianStop") +} + +#' DoubleBollinger indicator +#' @keywords internal +#' @export +DoubleBollinger <- function(period, k_inner, k_outer) { + ptr <- .Call("wk_double_bollinger_new", period, k_inner, k_outer, PACKAGE = "wickra") + .wk_obj("double_bollinger", ptr, "DoubleBollinger") +} + +#' DoubleTopBottom indicator +#' @keywords internal +#' @export +DoubleTopBottom <- function() { + ptr <- .Call("wk_double_top_bottom_new", PACKAGE = "wickra") + .wk_obj("double_top_bottom", ptr, "DoubleTopBottom") +} + +#' DownsideGapThreeMethods indicator +#' @keywords internal +#' @export +DownsideGapThreeMethods <- function() { + ptr <- .Call("wk_downside_gap_three_methods_new", PACKAGE = "wickra") + .wk_obj("downside_gap_three_methods", ptr, "DownsideGapThreeMethods") +} + +#' Dpo indicator +#' @keywords internal +#' @export +Dpo <- function(period) { + ptr <- .Call("wk_dpo_new", period, PACKAGE = "wickra") + .wk_obj("dpo", ptr, "Dpo") +} + +#' DragonflyDoji indicator +#' @keywords internal +#' @export +DragonflyDoji <- function() { + ptr <- .Call("wk_dragonfly_doji_new", PACKAGE = "wickra") + .wk_obj("dragonfly_doji", ptr, "DragonflyDoji") +} + +#' DrawdownDuration indicator +#' @keywords internal +#' @export +DrawdownDuration <- function() { + ptr <- .Call("wk_drawdown_duration_new", PACKAGE = "wickra") + .wk_obj("drawdown_duration", ptr, "DrawdownDuration") +} + +#' DumplingTop indicator +#' @keywords internal +#' @export +DumplingTop <- function(period) { + ptr <- .Call("wk_dumpling_top_new", period, PACKAGE = "wickra") + .wk_obj("dumpling_top", ptr, "DumplingTop") +} + +#' Dx indicator +#' @keywords internal +#' @export +Dx <- function(period) { + ptr <- .Call("wk_dx_new", period, PACKAGE = "wickra") + .wk_obj("dx", ptr, "Dx") +} + +#' DynamicMomentumIndex indicator +#' @keywords internal +#' @export +DynamicMomentumIndex <- function(period) { + ptr <- .Call("wk_dynamic_momentum_index_new", period, PACKAGE = "wickra") + .wk_obj("dynamic_momentum_index", ptr, "DynamicMomentumIndex") +} + +#' EaseOfMovement indicator +#' @keywords internal +#' @export +EaseOfMovement <- function(period) { + ptr <- .Call("wk_ease_of_movement_new", period, PACKAGE = "wickra") + .wk_obj("ease_of_movement", ptr, "EaseOfMovement") +} + +#' EffectiveSpread indicator +#' @keywords internal +#' @export +EffectiveSpread <- function() { + ptr <- .Call("wk_effective_spread_new", PACKAGE = "wickra") + .wk_obj("effective_spread", ptr, "EffectiveSpread") +} + +#' EhlersStochastic indicator +#' @keywords internal +#' @export +EhlersStochastic <- function(period) { + ptr <- .Call("wk_ehlers_stochastic_new", period, PACKAGE = "wickra") + .wk_obj("ehlers_stochastic", ptr, "EhlersStochastic") +} + +#' Ehma indicator +#' @keywords internal +#' @export +Ehma <- function(period) { + ptr <- .Call("wk_ehma_new", period, PACKAGE = "wickra") + .wk_obj("ehma", ptr, "Ehma") +} + +#' ElderImpulse indicator +#' @keywords internal +#' @export +ElderImpulse <- function(ema_period, macd_fast, macd_slow, macd_signal) { + ptr <- .Call("wk_elder_impulse_new", ema_period, macd_fast, macd_slow, macd_signal, PACKAGE = "wickra") + .wk_obj("elder_impulse", ptr, "ElderImpulse") +} + +#' ElderRay indicator +#' @keywords internal +#' @export +ElderRay <- function(period) { + ptr <- .Call("wk_elder_ray_new", period, PACKAGE = "wickra") + .wk_obj("elder_ray", ptr, "ElderRay") +} + +#' ElderSafeZone indicator +#' @keywords internal +#' @export +ElderSafeZone <- function(period, coeff) { + ptr <- .Call("wk_elder_safe_zone_new", period, coeff, PACKAGE = "wickra") + .wk_obj("elder_safe_zone", ptr, "ElderSafeZone") +} + +#' Ema indicator +#' @keywords internal +#' @export +Ema <- function(period) { + ptr <- .Call("wk_ema_new", period, PACKAGE = "wickra") + .wk_obj("ema", ptr, "Ema") +} + +#' EmpiricalModeDecomposition indicator +#' @keywords internal +#' @export +EmpiricalModeDecomposition <- function(period, fraction) { + ptr <- .Call("wk_empirical_mode_decomposition_new", period, fraction, PACKAGE = "wickra") + .wk_obj("empirical_mode_decomposition", ptr, "EmpiricalModeDecomposition") +} + +#' Engulfing indicator +#' @keywords internal +#' @export +Engulfing <- function() { + ptr <- .Call("wk_engulfing_new", PACKAGE = "wickra") + .wk_obj("engulfing", ptr, "Engulfing") +} + +#' Equivolume indicator +#' @keywords internal +#' @export +Equivolume <- function(period) { + ptr <- .Call("wk_equivolume_new", period, PACKAGE = "wickra") + .wk_obj("equivolume", ptr, "Equivolume") +} + +#' EstimatedLeverageRatio indicator +#' @keywords internal +#' @export +EstimatedLeverageRatio <- function() { + ptr <- .Call("wk_estimated_leverage_ratio_new", PACKAGE = "wickra") + .wk_obj("estimated_leverage_ratio", ptr, "EstimatedLeverageRatio") +} + +#' EvenBetterSinewave indicator +#' @keywords internal +#' @export +EvenBetterSinewave <- function(hp_period, ssf_length) { + ptr <- .Call("wk_even_better_sinewave_new", hp_period, ssf_length, PACKAGE = "wickra") + .wk_obj("even_better_sinewave", ptr, "EvenBetterSinewave") +} + +#' EveningDojiStar indicator +#' @keywords internal +#' @export +EveningDojiStar <- function() { + ptr <- .Call("wk_evening_doji_star_new", PACKAGE = "wickra") + .wk_obj("evening_doji_star", ptr, "EveningDojiStar") +} + +#' Evwma indicator +#' @keywords internal +#' @export +Evwma <- function(period) { + ptr <- .Call("wk_evwma_new", period, PACKAGE = "wickra") + .wk_obj("evwma", ptr, "Evwma") +} + +#' EwmaVolatility indicator +#' @keywords internal +#' @export +EwmaVolatility <- function(lambda) { + ptr <- .Call("wk_ewma_volatility_new", lambda, PACKAGE = "wickra") + .wk_obj("ewma_volatility", ptr, "EwmaVolatility") +} + +#' Expectancy indicator +#' @keywords internal +#' @export +Expectancy <- function(period) { + ptr <- .Call("wk_expectancy_new", period, PACKAGE = "wickra") + .wk_obj("expectancy", ptr, "Expectancy") +} + +#' FallingThreeMethods indicator +#' @keywords internal +#' @export +FallingThreeMethods <- function() { + ptr <- .Call("wk_falling_three_methods_new", PACKAGE = "wickra") + .wk_obj("falling_three_methods", ptr, "FallingThreeMethods") +} + +#' Fama indicator +#' @keywords internal +#' @export +Fama <- function(fast_limit, slow_limit) { + ptr <- .Call("wk_fama_new", fast_limit, slow_limit, PACKAGE = "wickra") + .wk_obj("fama", ptr, "Fama") +} + +#' FibArcs indicator +#' @keywords internal +#' @export +FibArcs <- function() { + ptr <- .Call("wk_fib_arcs_new", PACKAGE = "wickra") + .wk_obj("fib_arcs", ptr, "FibArcs") +} + +#' FibChannel indicator +#' @keywords internal +#' @export +FibChannel <- function() { + ptr <- .Call("wk_fib_channel_new", PACKAGE = "wickra") + .wk_obj("fib_channel", ptr, "FibChannel") +} + +#' FibConfluence indicator +#' @keywords internal +#' @export +FibConfluence <- function() { + ptr <- .Call("wk_fib_confluence_new", PACKAGE = "wickra") + .wk_obj("fib_confluence", ptr, "FibConfluence") +} + +#' FibExtension indicator +#' @keywords internal +#' @export +FibExtension <- function() { + ptr <- .Call("wk_fib_extension_new", PACKAGE = "wickra") + .wk_obj("fib_extension", ptr, "FibExtension") +} + +#' FibFan indicator +#' @keywords internal +#' @export +FibFan <- function() { + ptr <- .Call("wk_fib_fan_new", PACKAGE = "wickra") + .wk_obj("fib_fan", ptr, "FibFan") +} + +#' FibProjection indicator +#' @keywords internal +#' @export +FibProjection <- function() { + ptr <- .Call("wk_fib_projection_new", PACKAGE = "wickra") + .wk_obj("fib_projection", ptr, "FibProjection") +} + +#' FibRetracement indicator +#' @keywords internal +#' @export +FibRetracement <- function() { + ptr <- .Call("wk_fib_retracement_new", PACKAGE = "wickra") + .wk_obj("fib_retracement", ptr, "FibRetracement") +} + +#' FibTimeZones indicator +#' @keywords internal +#' @export +FibTimeZones <- function() { + ptr <- .Call("wk_fib_time_zones_new", PACKAGE = "wickra") + .wk_obj("fib_time_zones", ptr, "FibTimeZones") +} + +#' FibonacciPivots indicator +#' @keywords internal +#' @export +FibonacciPivots <- function() { + ptr <- .Call("wk_fibonacci_pivots_new", PACKAGE = "wickra") + .wk_obj("fibonacci_pivots", ptr, "FibonacciPivots") +} + +#' FisherRsi indicator +#' @keywords internal +#' @export +FisherRsi <- function(period) { + ptr <- .Call("wk_fisher_rsi_new", period, PACKAGE = "wickra") + .wk_obj("fisher_rsi", ptr, "FisherRsi") +} + +#' FisherTransform indicator +#' @keywords internal +#' @export +FisherTransform <- function(period) { + ptr <- .Call("wk_fisher_transform_new", period, PACKAGE = "wickra") + .wk_obj("fisher_transform", ptr, "FisherTransform") +} + +#' FlagPennant indicator +#' @keywords internal +#' @export +FlagPennant <- function() { + ptr <- .Call("wk_flag_pennant_new", PACKAGE = "wickra") + .wk_obj("flag_pennant", ptr, "FlagPennant") +} + +#' Footprint indicator +#' @keywords internal +#' @export +Footprint <- function(tick_size) { + ptr <- .Call("wk_footprint_new", tick_size, PACKAGE = "wickra") + .wk_obj("footprint", ptr, "Footprint") +} + +#' ForceIndex indicator +#' @keywords internal +#' @export +ForceIndex <- function(period) { + ptr <- .Call("wk_force_index_new", period, PACKAGE = "wickra") + .wk_obj("force_index", ptr, "ForceIndex") +} + +#' FractalChaosBands indicator +#' @keywords internal +#' @export +FractalChaosBands <- function(k) { + ptr <- .Call("wk_fractal_chaos_bands_new", k, PACKAGE = "wickra") + .wk_obj("fractal_chaos_bands", ptr, "FractalChaosBands") +} + +#' Frama indicator +#' @keywords internal +#' @export +Frama <- function(period) { + ptr <- .Call("wk_frama_new", period, PACKAGE = "wickra") + .wk_obj("frama", ptr, "Frama") +} + +#' FryPanBottom indicator +#' @keywords internal +#' @export +FryPanBottom <- function(period) { + ptr <- .Call("wk_fry_pan_bottom_new", period, PACKAGE = "wickra") + .wk_obj("fry_pan_bottom", ptr, "FryPanBottom") +} + +#' FundingBasis indicator +#' @keywords internal +#' @export +FundingBasis <- function() { + ptr <- .Call("wk_funding_basis_new", PACKAGE = "wickra") + .wk_obj("funding_basis", ptr, "FundingBasis") +} + +#' FundingImpliedApr indicator +#' @keywords internal +#' @export +FundingImpliedApr <- function(intervals_per_year) { + ptr <- .Call("wk_funding_implied_apr_new", intervals_per_year, PACKAGE = "wickra") + .wk_obj("funding_implied_apr", ptr, "FundingImpliedApr") +} + +#' FundingRate indicator +#' @keywords internal +#' @export +FundingRate <- function() { + ptr <- .Call("wk_funding_rate_new", PACKAGE = "wickra") + .wk_obj("funding_rate", ptr, "FundingRate") +} + +#' FundingRateMean indicator +#' @keywords internal +#' @export +FundingRateMean <- function(window) { + ptr <- .Call("wk_funding_rate_mean_new", window, PACKAGE = "wickra") + .wk_obj("funding_rate_mean", ptr, "FundingRateMean") +} + +#' FundingRateZScore indicator +#' @keywords internal +#' @export +FundingRateZScore <- function(window) { + ptr <- .Call("wk_funding_rate_z_score_new", window, PACKAGE = "wickra") + .wk_obj("funding_rate_z_score", ptr, "FundingRateZScore") +} + +#' GainLossRatio indicator +#' @keywords internal +#' @export +GainLossRatio <- function(period) { + ptr <- .Call("wk_gain_loss_ratio_new", period, PACKAGE = "wickra") + .wk_obj("gain_loss_ratio", ptr, "GainLossRatio") +} + +#' GainToPainRatio indicator +#' @keywords internal +#' @export +GainToPainRatio <- function(period) { + ptr <- .Call("wk_gain_to_pain_ratio_new", period, PACKAGE = "wickra") + .wk_obj("gain_to_pain_ratio", ptr, "GainToPainRatio") +} + +#' GapSideBySideWhite indicator +#' @keywords internal +#' @export +GapSideBySideWhite <- function() { + ptr <- .Call("wk_gap_side_by_side_white_new", PACKAGE = "wickra") + .wk_obj("gap_side_by_side_white", ptr, "GapSideBySideWhite") +} + +#' Garch11 indicator +#' @keywords internal +#' @export +Garch11 <- function(omega, alpha, beta) { + ptr <- .Call("wk_garch11_new", omega, alpha, beta, PACKAGE = "wickra") + .wk_obj("garch11", ptr, "Garch11") +} + +#' GarmanKlassVolatility indicator +#' @keywords internal +#' @export +GarmanKlassVolatility <- function(period, trading_periods) { + ptr <- .Call("wk_garman_klass_volatility_new", period, trading_periods, PACKAGE = "wickra") + .wk_obj("garman_klass_volatility", ptr, "GarmanKlassVolatility") +} + +#' Gartley indicator +#' @keywords internal +#' @export +Gartley <- function() { + ptr <- .Call("wk_gartley_new", PACKAGE = "wickra") + .wk_obj("gartley", ptr, "Gartley") +} + +#' GatorOscillator indicator +#' @keywords internal +#' @export +GatorOscillator <- function(jaw_period, teeth_period, lips_period) { + ptr <- .Call("wk_gator_oscillator_new", jaw_period, teeth_period, lips_period, PACKAGE = "wickra") + .wk_obj("gator_oscillator", ptr, "GatorOscillator") +} + +#' GeneralizedDema indicator +#' @keywords internal +#' @export +GeneralizedDema <- function(period, v) { + ptr <- .Call("wk_generalized_dema_new", period, v, PACKAGE = "wickra") + .wk_obj("generalized_dema", ptr, "GeneralizedDema") +} + +#' GeometricMa indicator +#' @keywords internal +#' @export +GeometricMa <- function(period) { + ptr <- .Call("wk_geometric_ma_new", period, PACKAGE = "wickra") + .wk_obj("geometric_ma", ptr, "GeometricMa") +} + +#' GoldenPocket indicator +#' @keywords internal +#' @export +GoldenPocket <- function() { + ptr <- .Call("wk_golden_pocket_new", PACKAGE = "wickra") + .wk_obj("golden_pocket", ptr, "GoldenPocket") +} + +#' GrangerCausality indicator +#' @keywords internal +#' @export +GrangerCausality <- function(period, lag) { + ptr <- .Call("wk_granger_causality_new", period, lag, PACKAGE = "wickra") + .wk_obj("granger_causality", ptr, "GrangerCausality") +} + +#' GravestoneDoji indicator +#' @keywords internal +#' @export +GravestoneDoji <- function() { + ptr <- .Call("wk_gravestone_doji_new", PACKAGE = "wickra") + .wk_obj("gravestone_doji", ptr, "GravestoneDoji") +} + +#' Hammer indicator +#' @keywords internal +#' @export +Hammer <- function() { + ptr <- .Call("wk_hammer_new", PACKAGE = "wickra") + .wk_obj("hammer", ptr, "Hammer") +} + +#' HangingMan indicator +#' @keywords internal +#' @export +HangingMan <- function() { + ptr <- .Call("wk_hanging_man_new", PACKAGE = "wickra") + .wk_obj("hanging_man", ptr, "HangingMan") +} + +#' Harami indicator +#' @keywords internal +#' @export +Harami <- function() { + ptr <- .Call("wk_harami_new", PACKAGE = "wickra") + .wk_obj("harami", ptr, "Harami") +} + +#' HaramiCross indicator +#' @keywords internal +#' @export +HaramiCross <- function() { + ptr <- .Call("wk_harami_cross_new", PACKAGE = "wickra") + .wk_obj("harami_cross", ptr, "HaramiCross") +} + +#' HasbrouckInformationShare indicator +#' @keywords internal +#' @export +HasbrouckInformationShare <- function(period) { + ptr <- .Call("wk_hasbrouck_information_share_new", period, PACKAGE = "wickra") + .wk_obj("hasbrouck_information_share", ptr, "HasbrouckInformationShare") +} + +#' HeadAndShoulders indicator +#' @keywords internal +#' @export +HeadAndShoulders <- function() { + ptr <- .Call("wk_head_and_shoulders_new", PACKAGE = "wickra") + .wk_obj("head_and_shoulders", ptr, "HeadAndShoulders") +} + +#' HeikinAshi indicator +#' @keywords internal +#' @export +HeikinAshi <- function() { + ptr <- .Call("wk_heikin_ashi_new", PACKAGE = "wickra") + .wk_obj("heikin_ashi", ptr, "HeikinAshi") +} + +#' HeikinAshiOscillator indicator +#' @keywords internal +#' @export +HeikinAshiOscillator <- function(period) { + ptr <- .Call("wk_heikin_ashi_oscillator_new", period, PACKAGE = "wickra") + .wk_obj("heikin_ashi_oscillator", ptr, "HeikinAshiOscillator") +} + +#' HiLoActivator indicator +#' @keywords internal +#' @export +HiLoActivator <- function(period) { + ptr <- .Call("wk_hi_lo_activator_new", period, PACKAGE = "wickra") + .wk_obj("hi_lo_activator", ptr, "HiLoActivator") +} + +#' HighLowIndex indicator +#' @keywords internal +#' @export +HighLowIndex <- function(period) { + ptr <- .Call("wk_high_low_index_new", period, PACKAGE = "wickra") + .wk_obj("high_low_index", ptr, "HighLowIndex") +} + +#' HighLowRange indicator +#' @keywords internal +#' @export +HighLowRange <- function() { + ptr <- .Call("wk_high_low_range_new", PACKAGE = "wickra") + .wk_obj("high_low_range", ptr, "HighLowRange") +} + +#' HighLowVolumeNodes indicator +#' @keywords internal +#' @export +HighLowVolumeNodes <- function(period, bins) { + ptr <- .Call("wk_high_low_volume_nodes_new", period, bins, PACKAGE = "wickra") + .wk_obj("high_low_volume_nodes", ptr, "HighLowVolumeNodes") +} + +#' HighWave indicator +#' @keywords internal +#' @export +HighWave <- function() { + ptr <- .Call("wk_high_wave_new", PACKAGE = "wickra") + .wk_obj("high_wave", ptr, "HighWave") +} + +#' HighpassFilter indicator +#' @keywords internal +#' @export +HighpassFilter <- function(period) { + ptr <- .Call("wk_highpass_filter_new", period, PACKAGE = "wickra") + .wk_obj("highpass_filter", ptr, "HighpassFilter") +} + +#' Hikkake indicator +#' @keywords internal +#' @export +Hikkake <- function() { + ptr <- .Call("wk_hikkake_new", PACKAGE = "wickra") + .wk_obj("hikkake", ptr, "Hikkake") +} + +#' HikkakeModified indicator +#' @keywords internal +#' @export +HikkakeModified <- function() { + ptr <- .Call("wk_hikkake_modified_new", PACKAGE = "wickra") + .wk_obj("hikkake_modified", ptr, "HikkakeModified") +} + +#' HilbertDominantCycle indicator +#' @keywords internal +#' @export +HilbertDominantCycle <- function() { + ptr <- .Call("wk_hilbert_dominant_cycle_new", PACKAGE = "wickra") + .wk_obj("hilbert_dominant_cycle", ptr, "HilbertDominantCycle") +} + +#' HistoricalVolatility indicator +#' @keywords internal +#' @export +HistoricalVolatility <- function(period, trading_periods) { + ptr <- .Call("wk_historical_volatility_new", period, trading_periods, PACKAGE = "wickra") + .wk_obj("historical_volatility", ptr, "HistoricalVolatility") +} + +#' Hma indicator +#' @keywords internal +#' @export +Hma <- function(period) { + ptr <- .Call("wk_hma_new", period, PACKAGE = "wickra") + .wk_obj("hma", ptr, "Hma") +} + +#' HoltWinters indicator +#' @keywords internal +#' @export +HoltWinters <- function(alpha, beta) { + ptr <- .Call("wk_holt_winters_new", alpha, beta, PACKAGE = "wickra") + .wk_obj("holt_winters", ptr, "HoltWinters") +} + +#' HomingPigeon indicator +#' @keywords internal +#' @export +HomingPigeon <- function() { + ptr <- .Call("wk_homing_pigeon_new", PACKAGE = "wickra") + .wk_obj("homing_pigeon", ptr, "HomingPigeon") +} + +#' HtDcPhase indicator +#' @keywords internal +#' @export +HtDcPhase <- function() { + ptr <- .Call("wk_ht_dc_phase_new", PACKAGE = "wickra") + .wk_obj("ht_dc_phase", ptr, "HtDcPhase") +} + +#' HtPhasor indicator +#' @keywords internal +#' @export +HtPhasor <- function() { + ptr <- .Call("wk_ht_phasor_new", PACKAGE = "wickra") + .wk_obj("ht_phasor", ptr, "HtPhasor") +} + +#' HtTrendMode indicator +#' @keywords internal +#' @export +HtTrendMode <- function() { + ptr <- .Call("wk_ht_trend_mode_new", PACKAGE = "wickra") + .wk_obj("ht_trend_mode", ptr, "HtTrendMode") +} + +#' HurstChannel indicator +#' @keywords internal +#' @export +HurstChannel <- function(period, multiplier) { + ptr <- .Call("wk_hurst_channel_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("hurst_channel", ptr, "HurstChannel") +} + +#' HurstExponent indicator +#' @keywords internal +#' @export +HurstExponent <- function(period, chunks) { + ptr <- .Call("wk_hurst_exponent_new", period, chunks, PACKAGE = "wickra") + .wk_obj("hurst_exponent", ptr, "HurstExponent") +} + +#' Ichimoku indicator +#' @keywords internal +#' @export +Ichimoku <- function(tenkan_period, kijun_period, senkou_b_period, displacement) { + ptr <- .Call("wk_ichimoku_new", tenkan_period, kijun_period, senkou_b_period, displacement, PACKAGE = "wickra") + .wk_obj("ichimoku", ptr, "Ichimoku") +} + +#' IdenticalThreeCrows indicator +#' @keywords internal +#' @export +IdenticalThreeCrows <- function() { + ptr <- .Call("wk_identical_three_crows_new", PACKAGE = "wickra") + .wk_obj("identical_three_crows", ptr, "IdenticalThreeCrows") +} + +#' ImbalanceBars indicator +#' @keywords internal +#' @export +ImbalanceBars <- function(threshold) { + ptr <- .Call("wk_imbalance_bars_new", threshold, PACKAGE = "wickra") + .wk_obj("imbalance_bars", ptr, "ImbalanceBars") +} + +#' InNeck indicator +#' @keywords internal +#' @export +InNeck <- function() { + ptr <- .Call("wk_in_neck_new", PACKAGE = "wickra") + .wk_obj("in_neck", ptr, "InNeck") +} + +#' Inertia indicator +#' @keywords internal +#' @export +Inertia <- function(rvi_period, linreg_period) { + ptr <- .Call("wk_inertia_new", rvi_period, linreg_period, PACKAGE = "wickra") + .wk_obj("inertia", ptr, "Inertia") +} + +#' InformationRatio indicator +#' @keywords internal +#' @export +InformationRatio <- function(period) { + ptr <- .Call("wk_information_ratio_new", period, PACKAGE = "wickra") + .wk_obj("information_ratio", ptr, "InformationRatio") +} + +#' InitialBalance indicator +#' @keywords internal +#' @export +InitialBalance <- function(period) { + ptr <- .Call("wk_initial_balance_new", period, PACKAGE = "wickra") + .wk_obj("initial_balance", ptr, "InitialBalance") +} + +#' InstantaneousTrendline indicator +#' @keywords internal +#' @export +InstantaneousTrendline <- function(period) { + ptr <- .Call("wk_instantaneous_trendline_new", period, PACKAGE = "wickra") + .wk_obj("instantaneous_trendline", ptr, "InstantaneousTrendline") +} + +#' IntradayIntensity indicator +#' @keywords internal +#' @export +IntradayIntensity <- function() { + ptr <- .Call("wk_intraday_intensity_new", PACKAGE = "wickra") + .wk_obj("intraday_intensity", ptr, "IntradayIntensity") +} + +#' IntradayMomentumIndex indicator +#' @keywords internal +#' @export +IntradayMomentumIndex <- function(period) { + ptr <- .Call("wk_intraday_momentum_index_new", period, PACKAGE = "wickra") + .wk_obj("intraday_momentum_index", ptr, "IntradayMomentumIndex") +} + +#' IntradayVolatilityProfile indicator +#' @keywords internal +#' @export +IntradayVolatilityProfile <- function(buckets, utc_offset_minutes) { + ptr <- .Call("wk_intraday_volatility_profile_new", buckets, utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("intraday_volatility_profile", ptr, "IntradayVolatilityProfile", values_cap = as.integer(buckets)) +} + +#' InverseFisherTransform indicator +#' @keywords internal +#' @export +InverseFisherTransform <- function(scale) { + ptr <- .Call("wk_inverse_fisher_transform_new", scale, PACKAGE = "wickra") + .wk_obj("inverse_fisher_transform", ptr, "InverseFisherTransform") +} + +#' InvertedHammer indicator +#' @keywords internal +#' @export +InvertedHammer <- function() { + ptr <- .Call("wk_inverted_hammer_new", PACKAGE = "wickra") + .wk_obj("inverted_hammer", ptr, "InvertedHammer") +} + +#' JarqueBera indicator +#' @keywords internal +#' @export +JarqueBera <- function(period) { + ptr <- .Call("wk_jarque_bera_new", period, PACKAGE = "wickra") + .wk_obj("jarque_bera", ptr, "JarqueBera") +} + +#' Jma indicator +#' @keywords internal +#' @export +Jma <- function(period, phase, power) { + ptr <- .Call("wk_jma_new", period, phase, power, PACKAGE = "wickra") + .wk_obj("jma", ptr, "Jma") +} + +#' JumpIndicator indicator +#' @keywords internal +#' @export +JumpIndicator <- function(period, threshold) { + ptr <- .Call("wk_jump_indicator_new", period, threshold, PACKAGE = "wickra") + .wk_obj("jump_indicator", ptr, "JumpIndicator") +} + +#' KRatio indicator +#' @keywords internal +#' @export +KRatio <- function(period) { + ptr <- .Call("wk_k_ratio_new", period, PACKAGE = "wickra") + .wk_obj("k_ratio", ptr, "KRatio") +} + +#' KagiBars indicator +#' @keywords internal +#' @export +KagiBars <- function(reversal) { + ptr <- .Call("wk_kagi_bars_new", reversal, PACKAGE = "wickra") + .wk_obj("kagi_bars", ptr, "KagiBars") +} + +#' KalmanHedgeRatio indicator +#' @keywords internal +#' @export +KalmanHedgeRatio <- function(delta, observation_var) { + ptr <- .Call("wk_kalman_hedge_ratio_new", delta, observation_var, PACKAGE = "wickra") + .wk_obj("kalman_hedge_ratio", ptr, "KalmanHedgeRatio") +} + +#' Kama indicator +#' @keywords internal +#' @export +Kama <- function(er_period, fast, slow) { + ptr <- .Call("wk_kama_new", er_period, fast, slow, PACKAGE = "wickra") + .wk_obj("kama", ptr, "Kama") +} + +#' KaseDevStop indicator +#' @keywords internal +#' @export +KaseDevStop <- function(period, dev) { + ptr <- .Call("wk_kase_dev_stop_new", period, dev, PACKAGE = "wickra") + .wk_obj("kase_dev_stop", ptr, "KaseDevStop") +} + +#' KasePermissionStochastic indicator +#' @keywords internal +#' @export +KasePermissionStochastic <- function(length, smooth) { + ptr <- .Call("wk_kase_permission_stochastic_new", length, smooth, PACKAGE = "wickra") + .wk_obj("kase_permission_stochastic", ptr, "KasePermissionStochastic") +} + +#' KellyCriterion indicator +#' @keywords internal +#' @export +KellyCriterion <- function(period) { + ptr <- .Call("wk_kelly_criterion_new", period, PACKAGE = "wickra") + .wk_obj("kelly_criterion", ptr, "KellyCriterion") +} + +#' Keltner indicator +#' @keywords internal +#' @export +Keltner <- function(ema_period, atr_period, multiplier) { + ptr <- .Call("wk_keltner_new", ema_period, atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("keltner", ptr, "Keltner") +} + +#' KendallTau indicator +#' @keywords internal +#' @export +KendallTau <- function(period) { + ptr <- .Call("wk_kendall_tau_new", period, PACKAGE = "wickra") + .wk_obj("kendall_tau", ptr, "KendallTau") +} + +#' Kicking indicator +#' @keywords internal +#' @export +Kicking <- function() { + ptr <- .Call("wk_kicking_new", PACKAGE = "wickra") + .wk_obj("kicking", ptr, "Kicking") +} + +#' KickingByLength indicator +#' @keywords internal +#' @export +KickingByLength <- function() { + ptr <- .Call("wk_kicking_by_length_new", PACKAGE = "wickra") + .wk_obj("kicking_by_length", ptr, "KickingByLength") +} + +#' Kst indicator +#' @keywords internal +#' @export +Kst <- function(roc1, roc2, roc3, roc4, sma1, sma2, sma3, sma4, signal) { + ptr <- .Call("wk_kst_new", roc1, roc2, roc3, roc4, sma1, sma2, sma3, sma4, signal, PACKAGE = "wickra") + .wk_obj("kst", ptr, "Kst") +} + +#' Kurtosis indicator +#' @keywords internal +#' @export +Kurtosis <- function(period) { + ptr <- .Call("wk_kurtosis_new", period, PACKAGE = "wickra") + .wk_obj("kurtosis", ptr, "Kurtosis") +} + +#' Kvo indicator +#' @keywords internal +#' @export +Kvo <- function(fast, slow) { + ptr <- .Call("wk_kvo_new", fast, slow, PACKAGE = "wickra") + .wk_obj("kvo", ptr, "Kvo") +} + +#' KylesLambda indicator +#' @keywords internal +#' @export +KylesLambda <- function(window) { + ptr <- .Call("wk_kyles_lambda_new", window, PACKAGE = "wickra") + .wk_obj("kyles_lambda", ptr, "KylesLambda") +} + +#' LadderBottom indicator +#' @keywords internal +#' @export +LadderBottom <- function() { + ptr <- .Call("wk_ladder_bottom_new", PACKAGE = "wickra") + .wk_obj("ladder_bottom", ptr, "LadderBottom") +} + +#' LaguerreRsi indicator +#' @keywords internal +#' @export +LaguerreRsi <- function(gamma) { + ptr <- .Call("wk_laguerre_rsi_new", gamma, PACKAGE = "wickra") + .wk_obj("laguerre_rsi", ptr, "LaguerreRsi") +} + +#' LeadLagCrossCorrelation indicator +#' @keywords internal +#' @export +LeadLagCrossCorrelation <- function(window, max_lag) { + ptr <- .Call("wk_lead_lag_cross_correlation_new", window, max_lag, PACKAGE = "wickra") + .wk_obj("lead_lag_cross_correlation", ptr, "LeadLagCrossCorrelation") +} + +#' LinRegAngle indicator +#' @keywords internal +#' @export +LinRegAngle <- function(period) { + ptr <- .Call("wk_lin_reg_angle_new", period, PACKAGE = "wickra") + .wk_obj("lin_reg_angle", ptr, "LinRegAngle") +} + +#' LinRegChannel indicator +#' @keywords internal +#' @export +LinRegChannel <- function(period, multiplier) { + ptr <- .Call("wk_lin_reg_channel_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("lin_reg_channel", ptr, "LinRegChannel") +} + +#' LinRegIntercept indicator +#' @keywords internal +#' @export +LinRegIntercept <- function(period) { + ptr <- .Call("wk_lin_reg_intercept_new", period, PACKAGE = "wickra") + .wk_obj("lin_reg_intercept", ptr, "LinRegIntercept") +} + +#' LinRegSlope indicator +#' @keywords internal +#' @export +LinRegSlope <- function(period) { + ptr <- .Call("wk_lin_reg_slope_new", period, PACKAGE = "wickra") + .wk_obj("lin_reg_slope", ptr, "LinRegSlope") +} + +#' LinearRegression indicator +#' @keywords internal +#' @export +LinearRegression <- function(period) { + ptr <- .Call("wk_linear_regression_new", period, PACKAGE = "wickra") + .wk_obj("linear_regression", ptr, "LinearRegression") +} + +#' LiquidationFeatures indicator +#' @keywords internal +#' @export +LiquidationFeatures <- function() { + ptr <- .Call("wk_liquidation_features_new", PACKAGE = "wickra") + .wk_obj("liquidation_features", ptr, "LiquidationFeatures") +} + +#' LogReturn indicator +#' @keywords internal +#' @export +LogReturn <- function(period) { + ptr <- .Call("wk_log_return_new", period, PACKAGE = "wickra") + .wk_obj("log_return", ptr, "LogReturn") +} + +#' LongLeggedDoji indicator +#' @keywords internal +#' @export +LongLeggedDoji <- function() { + ptr <- .Call("wk_long_legged_doji_new", PACKAGE = "wickra") + .wk_obj("long_legged_doji", ptr, "LongLeggedDoji") +} + +#' LongLine indicator +#' @keywords internal +#' @export +LongLine <- function() { + ptr <- .Call("wk_long_line_new", PACKAGE = "wickra") + .wk_obj("long_line", ptr, "LongLine") +} + +#' LongShortRatio indicator +#' @keywords internal +#' @export +LongShortRatio <- function() { + ptr <- .Call("wk_long_short_ratio_new", PACKAGE = "wickra") + .wk_obj("long_short_ratio", ptr, "LongShortRatio") +} + +#' M2Measure indicator +#' @keywords internal +#' @export +M2Measure <- function(period, risk_free, benchmark_stddev) { + ptr <- .Call("wk_m2_measure_new", period, risk_free, benchmark_stddev, PACKAGE = "wickra") + .wk_obj("m2_measure", ptr, "M2Measure") +} + +#' MaEnvelope indicator +#' @keywords internal +#' @export +MaEnvelope <- function(period, percent) { + ptr <- .Call("wk_ma_envelope_new", period, percent, PACKAGE = "wickra") + .wk_obj("ma_envelope", ptr, "MaEnvelope") +} + +#' MacdExt indicator +#' @keywords internal +#' @export +MacdExt <- function(fast, fast_type, slow, slow_type, signal, signal_type) { + ptr <- .Call("wk_macd_ext_new", fast, fast_type, slow, slow_type, signal, signal_type, PACKAGE = "wickra") + .wk_obj("macd_ext", ptr, "MacdExt") +} + +#' MacdFix indicator +#' @keywords internal +#' @export +MacdFix <- function(signal) { + ptr <- .Call("wk_macd_fix_new", signal, PACKAGE = "wickra") + .wk_obj("macd_fix", ptr, "MacdFix") +} + +#' MacdHistogram indicator +#' @keywords internal +#' @export +MacdHistogram <- function(fast, slow, signal) { + ptr <- .Call("wk_macd_histogram_new", fast, slow, signal, PACKAGE = "wickra") + .wk_obj("macd_histogram", ptr, "MacdHistogram") +} + +#' MacdIndicator indicator +#' @keywords internal +#' @export +MacdIndicator <- function(fast, slow, signal) { + ptr <- .Call("wk_macd_indicator_new", fast, slow, signal, PACKAGE = "wickra") + .wk_obj("macd_indicator", ptr, "MacdIndicator") +} + +#' Mama indicator +#' @keywords internal +#' @export +Mama <- function(fast_limit, slow_limit) { + ptr <- .Call("wk_mama_new", fast_limit, slow_limit, PACKAGE = "wickra") + .wk_obj("mama", ptr, "Mama") +} + +#' MarketFacilitationIndex indicator +#' @keywords internal +#' @export +MarketFacilitationIndex <- function() { + ptr <- .Call("wk_market_facilitation_index_new", PACKAGE = "wickra") + .wk_obj("market_facilitation_index", ptr, "MarketFacilitationIndex") +} + +#' MartinRatio indicator +#' @keywords internal +#' @export +MartinRatio <- function(period) { + ptr <- .Call("wk_martin_ratio_new", period, PACKAGE = "wickra") + .wk_obj("martin_ratio", ptr, "MartinRatio") +} + +#' Marubozu indicator +#' @keywords internal +#' @export +Marubozu <- function() { + ptr <- .Call("wk_marubozu_new", PACKAGE = "wickra") + .wk_obj("marubozu", ptr, "Marubozu") +} + +#' MassIndex indicator +#' @keywords internal +#' @export +MassIndex <- function(ema_period, sum_period) { + ptr <- .Call("wk_mass_index_new", ema_period, sum_period, PACKAGE = "wickra") + .wk_obj("mass_index", ptr, "MassIndex") +} + +#' MatHold indicator +#' @keywords internal +#' @export +MatHold <- function() { + ptr <- .Call("wk_mat_hold_new", PACKAGE = "wickra") + .wk_obj("mat_hold", ptr, "MatHold") +} + +#' MatchingLow indicator +#' @keywords internal +#' @export +MatchingLow <- function() { + ptr <- .Call("wk_matching_low_new", PACKAGE = "wickra") + .wk_obj("matching_low", ptr, "MatchingLow") +} + +#' MaxDrawdown indicator +#' @keywords internal +#' @export +MaxDrawdown <- function(period) { + ptr <- .Call("wk_max_drawdown_new", period, PACKAGE = "wickra") + .wk_obj("max_drawdown", ptr, "MaxDrawdown") +} + +#' McClellanOscillator indicator +#' @keywords internal +#' @export +McClellanOscillator <- function() { + ptr <- .Call("wk_mc_clellan_oscillator_new", PACKAGE = "wickra") + .wk_obj("mc_clellan_oscillator", ptr, "McClellanOscillator") +} + +#' McClellanSummationIndex indicator +#' @keywords internal +#' @export +McClellanSummationIndex <- function() { + ptr <- .Call("wk_mc_clellan_summation_index_new", PACKAGE = "wickra") + .wk_obj("mc_clellan_summation_index", ptr, "McClellanSummationIndex") +} + +#' McGinleyDynamic indicator +#' @keywords internal +#' @export +McGinleyDynamic <- function(period) { + ptr <- .Call("wk_mc_ginley_dynamic_new", period, PACKAGE = "wickra") + .wk_obj("mc_ginley_dynamic", ptr, "McGinleyDynamic") +} + +#' MedianAbsoluteDeviation indicator +#' @keywords internal +#' @export +MedianAbsoluteDeviation <- function(period) { + ptr <- .Call("wk_median_absolute_deviation_new", period, PACKAGE = "wickra") + .wk_obj("median_absolute_deviation", ptr, "MedianAbsoluteDeviation") +} + +#' MedianChannel indicator +#' @keywords internal +#' @export +MedianChannel <- function(period, multiplier) { + ptr <- .Call("wk_median_channel_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("median_channel", ptr, "MedianChannel") +} + +#' MedianMa indicator +#' @keywords internal +#' @export +MedianMa <- function(period) { + ptr <- .Call("wk_median_ma_new", period, PACKAGE = "wickra") + .wk_obj("median_ma", ptr, "MedianMa") +} + +#' MedianPrice indicator +#' @keywords internal +#' @export +MedianPrice <- function() { + ptr <- .Call("wk_median_price_new", PACKAGE = "wickra") + .wk_obj("median_price", ptr, "MedianPrice") +} + +#' Mfi indicator +#' @keywords internal +#' @export +Mfi <- function(period) { + ptr <- .Call("wk_mfi_new", period, PACKAGE = "wickra") + .wk_obj("mfi", ptr, "Mfi") +} + +#' Microprice indicator +#' @keywords internal +#' @export +Microprice <- function() { + ptr <- .Call("wk_microprice_new", PACKAGE = "wickra") + .wk_obj("microprice", ptr, "Microprice") +} + +#' MidPoint indicator +#' @keywords internal +#' @export +MidPoint <- function(period) { + ptr <- .Call("wk_mid_point_new", period, PACKAGE = "wickra") + .wk_obj("mid_point", ptr, "MidPoint") +} + +#' MidPrice indicator +#' @keywords internal +#' @export +MidPrice <- function(period) { + ptr <- .Call("wk_mid_price_new", period, PACKAGE = "wickra") + .wk_obj("mid_price", ptr, "MidPrice") +} + +#' MinusDi indicator +#' @keywords internal +#' @export +MinusDi <- function(period) { + ptr <- .Call("wk_minus_di_new", period, PACKAGE = "wickra") + .wk_obj("minus_di", ptr, "MinusDi") +} + +#' MinusDm indicator +#' @keywords internal +#' @export +MinusDm <- function(period) { + ptr <- .Call("wk_minus_dm_new", period, PACKAGE = "wickra") + .wk_obj("minus_dm", ptr, "MinusDm") +} + +#' ModifiedMaStop indicator +#' @keywords internal +#' @export +ModifiedMaStop <- function(period) { + ptr <- .Call("wk_modified_ma_stop_new", period, PACKAGE = "wickra") + .wk_obj("modified_ma_stop", ptr, "ModifiedMaStop") +} + +#' Mom indicator +#' @keywords internal +#' @export +Mom <- function(period) { + ptr <- .Call("wk_mom_new", period, PACKAGE = "wickra") + .wk_obj("mom", ptr, "Mom") +} + +#' MorningDojiStar indicator +#' @keywords internal +#' @export +MorningDojiStar <- function() { + ptr <- .Call("wk_morning_doji_star_new", PACKAGE = "wickra") + .wk_obj("morning_doji_star", ptr, "MorningDojiStar") +} + +#' MorningEveningStar indicator +#' @keywords internal +#' @export +MorningEveningStar <- function() { + ptr <- .Call("wk_morning_evening_star_new", PACKAGE = "wickra") + .wk_obj("morning_evening_star", ptr, "MorningEveningStar") +} + +#' MurreyMathLines indicator +#' @keywords internal +#' @export +MurreyMathLines <- function(period) { + ptr <- .Call("wk_murrey_math_lines_new", period, PACKAGE = "wickra") + .wk_obj("murrey_math_lines", ptr, "MurreyMathLines") +} + +#' NakedPoc indicator +#' @keywords internal +#' @export +NakedPoc <- function(session_len, bins) { + ptr <- .Call("wk_naked_poc_new", session_len, bins, PACKAGE = "wickra") + .wk_obj("naked_poc", ptr, "NakedPoc") +} + +#' Natr indicator +#' @keywords internal +#' @export +Natr <- function(period) { + ptr <- .Call("wk_natr_new", period, PACKAGE = "wickra") + .wk_obj("natr", ptr, "Natr") +} + +#' NewHighsNewLows indicator +#' @keywords internal +#' @export +NewHighsNewLows <- function() { + ptr <- .Call("wk_new_highs_new_lows_new", PACKAGE = "wickra") + .wk_obj("new_highs_new_lows", ptr, "NewHighsNewLows") +} + +#' NewPriceLines indicator +#' @keywords internal +#' @export +NewPriceLines <- function(count) { + ptr <- .Call("wk_new_price_lines_new", count, PACKAGE = "wickra") + .wk_obj("new_price_lines", ptr, "NewPriceLines") +} + +#' Nrtr indicator +#' @keywords internal +#' @export +Nrtr <- function(pct) { + ptr <- .Call("wk_nrtr_new", pct, PACKAGE = "wickra") + .wk_obj("nrtr", ptr, "Nrtr") +} + +#' Nvi indicator +#' @keywords internal +#' @export +Nvi <- function() { + ptr <- .Call("wk_nvi_new", PACKAGE = "wickra") + .wk_obj("nvi", ptr, "Nvi") +} + +#' Obv indicator +#' @keywords internal +#' @export +Obv <- function() { + ptr <- .Call("wk_obv_new", PACKAGE = "wickra") + .wk_obj("obv", ptr, "Obv") +} + +#' OIPriceDivergence indicator +#' @keywords internal +#' @export +OIPriceDivergence <- function(window) { + ptr <- .Call("wk_oi_price_divergence_new", window, PACKAGE = "wickra") + .wk_obj("oi_price_divergence", ptr, "OIPriceDivergence") +} + +#' OiToVolumeRatio indicator +#' @keywords internal +#' @export +OiToVolumeRatio <- function() { + ptr <- .Call("wk_oi_to_volume_ratio_new", PACKAGE = "wickra") + .wk_obj("oi_to_volume_ratio", ptr, "OiToVolumeRatio") +} + +#' OIWeighted indicator +#' @keywords internal +#' @export +OIWeighted <- function() { + ptr <- .Call("wk_oi_weighted_new", PACKAGE = "wickra") + .wk_obj("oi_weighted", ptr, "OIWeighted") +} + +#' OmegaRatio indicator +#' @keywords internal +#' @export +OmegaRatio <- function(period, threshold) { + ptr <- .Call("wk_omega_ratio_new", period, threshold, PACKAGE = "wickra") + .wk_obj("omega_ratio", ptr, "OmegaRatio") +} + +#' OnNeck indicator +#' @keywords internal +#' @export +OnNeck <- function() { + ptr <- .Call("wk_on_neck_new", PACKAGE = "wickra") + .wk_obj("on_neck", ptr, "OnNeck") +} + +#' OpenInterestDelta indicator +#' @keywords internal +#' @export +OpenInterestDelta <- function() { + ptr <- .Call("wk_open_interest_delta_new", PACKAGE = "wickra") + .wk_obj("open_interest_delta", ptr, "OpenInterestDelta") +} + +#' OpenInterestMomentum indicator +#' @keywords internal +#' @export +OpenInterestMomentum <- function(period) { + ptr <- .Call("wk_open_interest_momentum_new", period, PACKAGE = "wickra") + .wk_obj("open_interest_momentum", ptr, "OpenInterestMomentum") +} + +#' OpeningMarubozu indicator +#' @keywords internal +#' @export +OpeningMarubozu <- function() { + ptr <- .Call("wk_opening_marubozu_new", PACKAGE = "wickra") + .wk_obj("opening_marubozu", ptr, "OpeningMarubozu") +} + +#' OpeningRange indicator +#' @keywords internal +#' @export +OpeningRange <- function(period) { + ptr <- .Call("wk_opening_range_new", period, PACKAGE = "wickra") + .wk_obj("opening_range", ptr, "OpeningRange") +} + +#' OrderBookImbalanceFull indicator +#' @keywords internal +#' @export +OrderBookImbalanceFull <- function() { + ptr <- .Call("wk_order_book_imbalance_full_new", PACKAGE = "wickra") + .wk_obj("order_book_imbalance_full", ptr, "OrderBookImbalanceFull") +} + +#' OrderBookImbalanceTop1 indicator +#' @keywords internal +#' @export +OrderBookImbalanceTop1 <- function() { + ptr <- .Call("wk_order_book_imbalance_top1_new", PACKAGE = "wickra") + .wk_obj("order_book_imbalance_top1", ptr, "OrderBookImbalanceTop1") +} + +#' OrderBookImbalanceTopN indicator +#' @keywords internal +#' @export +OrderBookImbalanceTopN <- function(levels) { + ptr <- .Call("wk_order_book_imbalance_top_n_new", levels, PACKAGE = "wickra") + .wk_obj("order_book_imbalance_top_n", ptr, "OrderBookImbalanceTopN") +} + +#' OrderFlowImbalance indicator +#' @keywords internal +#' @export +OrderFlowImbalance <- function(period) { + ptr <- .Call("wk_order_flow_imbalance_new", period, PACKAGE = "wickra") + .wk_obj("order_flow_imbalance", ptr, "OrderFlowImbalance") +} + +#' OuHalfLife indicator +#' @keywords internal +#' @export +OuHalfLife <- function(period) { + ptr <- .Call("wk_ou_half_life_new", period, PACKAGE = "wickra") + .wk_obj("ou_half_life", ptr, "OuHalfLife") +} + +#' OvernightGap indicator +#' @keywords internal +#' @export +OvernightGap <- function(utc_offset_minutes) { + ptr <- .Call("wk_overnight_gap_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("overnight_gap", ptr, "OvernightGap") +} + +#' OvernightIntradayReturn indicator +#' @keywords internal +#' @export +OvernightIntradayReturn <- function(utc_offset_minutes) { + ptr <- .Call("wk_overnight_intraday_return_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("overnight_intraday_return", ptr, "OvernightIntradayReturn") +} + +#' PainIndex indicator +#' @keywords internal +#' @export +PainIndex <- function(period) { + ptr <- .Call("wk_pain_index_new", period, PACKAGE = "wickra") + .wk_obj("pain_index", ptr, "PainIndex") +} + +#' PairSpreadZScore indicator +#' @keywords internal +#' @export +PairSpreadZScore <- function(beta_period, z_period) { + ptr <- .Call("wk_pair_spread_z_score_new", beta_period, z_period, PACKAGE = "wickra") + .wk_obj("pair_spread_z_score", ptr, "PairSpreadZScore") +} + +#' PairwiseBeta indicator +#' @keywords internal +#' @export +PairwiseBeta <- function(period) { + ptr <- .Call("wk_pairwise_beta_new", period, PACKAGE = "wickra") + .wk_obj("pairwise_beta", ptr, "PairwiseBeta") +} + +#' ParkinsonVolatility indicator +#' @keywords internal +#' @export +ParkinsonVolatility <- function(period, trading_periods) { + ptr <- .Call("wk_parkinson_volatility_new", period, trading_periods, PACKAGE = "wickra") + .wk_obj("parkinson_volatility", ptr, "ParkinsonVolatility") +} + +#' PearsonCorrelation indicator +#' @keywords internal +#' @export +PearsonCorrelation <- function(period) { + ptr <- .Call("wk_pearson_correlation_new", period, PACKAGE = "wickra") + .wk_obj("pearson_correlation", ptr, "PearsonCorrelation") +} + +#' PercentAboveMa indicator +#' @keywords internal +#' @export +PercentAboveMa <- function() { + ptr <- .Call("wk_percent_above_ma_new", PACKAGE = "wickra") + .wk_obj("percent_above_ma", ptr, "PercentAboveMa") +} + +#' PercentB indicator +#' @keywords internal +#' @export +PercentB <- function(period, multiplier) { + ptr <- .Call("wk_percent_b_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("percent_b", ptr, "PercentB") +} + +#' PercentageTrailingStop indicator +#' @keywords internal +#' @export +PercentageTrailingStop <- function(percent) { + ptr <- .Call("wk_percentage_trailing_stop_new", percent, PACKAGE = "wickra") + .wk_obj("percentage_trailing_stop", ptr, "PercentageTrailingStop") +} + +#' PerpetualPremiumIndex indicator +#' @keywords internal +#' @export +PerpetualPremiumIndex <- function() { + ptr <- .Call("wk_perpetual_premium_index_new", PACKAGE = "wickra") + .wk_obj("perpetual_premium_index", ptr, "PerpetualPremiumIndex") +} + +#' Pgo indicator +#' @keywords internal +#' @export +Pgo <- function(period) { + ptr <- .Call("wk_pgo_new", period, PACKAGE = "wickra") + .wk_obj("pgo", ptr, "Pgo") +} + +#' PiercingDarkCloud indicator +#' @keywords internal +#' @export +PiercingDarkCloud <- function() { + ptr <- .Call("wk_piercing_dark_cloud_new", PACKAGE = "wickra") + .wk_obj("piercing_dark_cloud", ptr, "PiercingDarkCloud") +} + +#' Pin indicator +#' @keywords internal +#' @export +Pin <- function(window) { + ptr <- .Call("wk_pin_new", window, PACKAGE = "wickra") + .wk_obj("pin", ptr, "Pin") +} + +#' PivotReversal indicator +#' @keywords internal +#' @export +PivotReversal <- function(left, right) { + ptr <- .Call("wk_pivot_reversal_new", left, right, PACKAGE = "wickra") + .wk_obj("pivot_reversal", ptr, "PivotReversal") +} + +#' PlusDi indicator +#' @keywords internal +#' @export +PlusDi <- function(period) { + ptr <- .Call("wk_plus_di_new", period, PACKAGE = "wickra") + .wk_obj("plus_di", ptr, "PlusDi") +} + +#' PlusDm indicator +#' @keywords internal +#' @export +PlusDm <- function(period) { + ptr <- .Call("wk_plus_dm_new", period, PACKAGE = "wickra") + .wk_obj("plus_dm", ptr, "PlusDm") +} + +#' Pmo indicator +#' @keywords internal +#' @export +Pmo <- function(smoothing1, smoothing2) { + ptr <- .Call("wk_pmo_new", smoothing1, smoothing2, PACKAGE = "wickra") + .wk_obj("pmo", ptr, "Pmo") +} + +#' PointAndFigureBars indicator +#' @keywords internal +#' @export +PointAndFigureBars <- function(box_size, reversal) { + ptr <- .Call("wk_point_and_figure_bars_new", box_size, reversal, PACKAGE = "wickra") + .wk_obj("point_and_figure_bars", ptr, "PointAndFigureBars") +} + +#' PolarizedFractalEfficiency indicator +#' @keywords internal +#' @export +PolarizedFractalEfficiency <- function(period, smoothing) { + ptr <- .Call("wk_polarized_fractal_efficiency_new", period, smoothing, PACKAGE = "wickra") + .wk_obj("polarized_fractal_efficiency", ptr, "PolarizedFractalEfficiency") +} + +#' Ppo indicator +#' @keywords internal +#' @export +Ppo <- function(fast, slow) { + ptr <- .Call("wk_ppo_new", fast, slow, PACKAGE = "wickra") + .wk_obj("ppo", ptr, "Ppo") +} + +#' PpoHistogram indicator +#' @keywords internal +#' @export +PpoHistogram <- function(fast, slow, signal) { + ptr <- .Call("wk_ppo_histogram_new", fast, slow, signal, PACKAGE = "wickra") + .wk_obj("ppo_histogram", ptr, "PpoHistogram") +} + +#' ProfileShape indicator +#' @keywords internal +#' @export +ProfileShape <- function(period, bins) { + ptr <- .Call("wk_profile_shape_new", period, bins, PACKAGE = "wickra") + .wk_obj("profile_shape", ptr, "ProfileShape") +} + +#' ProfitFactor indicator +#' @keywords internal +#' @export +ProfitFactor <- function(period) { + ptr <- .Call("wk_profit_factor_new", period, PACKAGE = "wickra") + .wk_obj("profit_factor", ptr, "ProfitFactor") +} + +#' ProjectionBands indicator +#' @keywords internal +#' @export +ProjectionBands <- function(period) { + ptr <- .Call("wk_projection_bands_new", period, PACKAGE = "wickra") + .wk_obj("projection_bands", ptr, "ProjectionBands") +} + +#' ProjectionOscillator indicator +#' @keywords internal +#' @export +ProjectionOscillator <- function(period) { + ptr <- .Call("wk_projection_oscillator_new", period, PACKAGE = "wickra") + .wk_obj("projection_oscillator", ptr, "ProjectionOscillator") +} + +#' Psar indicator +#' @keywords internal +#' @export +Psar <- function(af_start, af_step, af_max) { + ptr <- .Call("wk_psar_new", af_start, af_step, af_max, PACKAGE = "wickra") + .wk_obj("psar", ptr, "Psar") +} + +#' Pvi indicator +#' @keywords internal +#' @export +Pvi <- function() { + ptr <- .Call("wk_pvi_new", PACKAGE = "wickra") + .wk_obj("pvi", ptr, "Pvi") +} + +#' Qqe indicator +#' @keywords internal +#' @export +Qqe <- function(rsi_period, smoothing, factor) { + ptr <- .Call("wk_qqe_new", rsi_period, smoothing, factor, PACKAGE = "wickra") + .wk_obj("qqe", ptr, "Qqe") +} + +#' Qstick indicator +#' @keywords internal +#' @export +Qstick <- function(period) { + ptr <- .Call("wk_qstick_new", period, PACKAGE = "wickra") + .wk_obj("qstick", ptr, "Qstick") +} + +#' QuartileBands indicator +#' @keywords internal +#' @export +QuartileBands <- function(period) { + ptr <- .Call("wk_quartile_bands_new", period, PACKAGE = "wickra") + .wk_obj("quartile_bands", ptr, "QuartileBands") +} + +#' QuotedSpread indicator +#' @keywords internal +#' @export +QuotedSpread <- function() { + ptr <- .Call("wk_quoted_spread_new", PACKAGE = "wickra") + .wk_obj("quoted_spread", ptr, "QuotedSpread") +} + +#' RSquared indicator +#' @keywords internal +#' @export +RSquared <- function(period) { + ptr <- .Call("wk_r_squared_new", period, PACKAGE = "wickra") + .wk_obj("r_squared", ptr, "RSquared") +} + +#' RangeBars indicator +#' @keywords internal +#' @export +RangeBars <- function(range) { + ptr <- .Call("wk_range_bars_new", range, PACKAGE = "wickra") + .wk_obj("range_bars", ptr, "RangeBars") +} + +#' RealizedSpread indicator +#' @keywords internal +#' @export +RealizedSpread <- function(horizon) { + ptr <- .Call("wk_realized_spread_new", horizon, PACKAGE = "wickra") + .wk_obj("realized_spread", ptr, "RealizedSpread") +} + +#' RealizedVolatility indicator +#' @keywords internal +#' @export +RealizedVolatility <- function(period) { + ptr <- .Call("wk_realized_volatility_new", period, PACKAGE = "wickra") + .wk_obj("realized_volatility", ptr, "RealizedVolatility") +} + +#' RecoveryFactor indicator +#' @keywords internal +#' @export +RecoveryFactor <- function() { + ptr <- .Call("wk_recovery_factor_new", PACKAGE = "wickra") + .wk_obj("recovery_factor", ptr, "RecoveryFactor") +} + +#' RectangleRange indicator +#' @keywords internal +#' @export +RectangleRange <- function() { + ptr <- .Call("wk_rectangle_range_new", PACKAGE = "wickra") + .wk_obj("rectangle_range", ptr, "RectangleRange") +} + +#' Reflex indicator +#' @keywords internal +#' @export +Reflex <- function(period) { + ptr <- .Call("wk_reflex_new", period, PACKAGE = "wickra") + .wk_obj("reflex", ptr, "Reflex") +} + +#' RegimeLabel indicator +#' @keywords internal +#' @export +RegimeLabel <- function(vol_period, lookback) { + ptr <- .Call("wk_regime_label_new", vol_period, lookback, PACKAGE = "wickra") + .wk_obj("regime_label", ptr, "RegimeLabel") +} + +#' RelativeStrengthAB indicator +#' @keywords internal +#' @export +RelativeStrengthAB <- function(ma_period, rsi_period) { + ptr <- .Call("wk_relative_strength_ab_new", ma_period, rsi_period, PACKAGE = "wickra") + .wk_obj("relative_strength_ab", ptr, "RelativeStrengthAB") +} + +#' RenkoBars indicator +#' @keywords internal +#' @export +RenkoBars <- function(box_size) { + ptr <- .Call("wk_renko_bars_new", box_size, PACKAGE = "wickra") + .wk_obj("renko_bars", ptr, "RenkoBars") +} + +#' RenkoTrailingStop indicator +#' @keywords internal +#' @export +RenkoTrailingStop <- function(block_size) { + ptr <- .Call("wk_renko_trailing_stop_new", block_size, PACKAGE = "wickra") + .wk_obj("renko_trailing_stop", ptr, "RenkoTrailingStop") +} + +#' RickshawMan indicator +#' @keywords internal +#' @export +RickshawMan <- function() { + ptr <- .Call("wk_rickshaw_man_new", PACKAGE = "wickra") + .wk_obj("rickshaw_man", ptr, "RickshawMan") +} + +#' RisingThreeMethods indicator +#' @keywords internal +#' @export +RisingThreeMethods <- function() { + ptr <- .Call("wk_rising_three_methods_new", PACKAGE = "wickra") + .wk_obj("rising_three_methods", ptr, "RisingThreeMethods") +} + +#' Rmi indicator +#' @keywords internal +#' @export +Rmi <- function(period, momentum) { + ptr <- .Call("wk_rmi_new", period, momentum, PACKAGE = "wickra") + .wk_obj("rmi", ptr, "Rmi") +} + +#' Roc indicator +#' @keywords internal +#' @export +Roc <- function(period) { + ptr <- .Call("wk_roc_new", period, PACKAGE = "wickra") + .wk_obj("roc", ptr, "Roc") +} + +#' Rocp indicator +#' @keywords internal +#' @export +Rocp <- function(period) { + ptr <- .Call("wk_rocp_new", period, PACKAGE = "wickra") + .wk_obj("rocp", ptr, "Rocp") +} + +#' Rocr indicator +#' @keywords internal +#' @export +Rocr <- function(period) { + ptr <- .Call("wk_rocr_new", period, PACKAGE = "wickra") + .wk_obj("rocr", ptr, "Rocr") +} + +#' Rocr100 indicator +#' @keywords internal +#' @export +Rocr100 <- function(period) { + ptr <- .Call("wk_rocr100_new", period, PACKAGE = "wickra") + .wk_obj("rocr100", ptr, "Rocr100") +} + +#' RogersSatchellVolatility indicator +#' @keywords internal +#' @export +RogersSatchellVolatility <- function(period, trading_periods) { + ptr <- .Call("wk_rogers_satchell_volatility_new", period, trading_periods, PACKAGE = "wickra") + .wk_obj("rogers_satchell_volatility", ptr, "RogersSatchellVolatility") +} + +#' RollMeasure indicator +#' @keywords internal +#' @export +RollMeasure <- function(period) { + ptr <- .Call("wk_roll_measure_new", period, PACKAGE = "wickra") + .wk_obj("roll_measure", ptr, "RollMeasure") +} + +#' RollingCorrelation indicator +#' @keywords internal +#' @export +RollingCorrelation <- function(period) { + ptr <- .Call("wk_rolling_correlation_new", period, PACKAGE = "wickra") + .wk_obj("rolling_correlation", ptr, "RollingCorrelation") +} + +#' RollingCovariance indicator +#' @keywords internal +#' @export +RollingCovariance <- function(period) { + ptr <- .Call("wk_rolling_covariance_new", period, PACKAGE = "wickra") + .wk_obj("rolling_covariance", ptr, "RollingCovariance") +} + +#' RollingIqr indicator +#' @keywords internal +#' @export +RollingIqr <- function(period) { + ptr <- .Call("wk_rolling_iqr_new", period, PACKAGE = "wickra") + .wk_obj("rolling_iqr", ptr, "RollingIqr") +} + +#' RollingMinMaxScaler indicator +#' @keywords internal +#' @export +RollingMinMaxScaler <- function(period) { + ptr <- .Call("wk_rolling_min_max_scaler_new", period, PACKAGE = "wickra") + .wk_obj("rolling_min_max_scaler", ptr, "RollingMinMaxScaler") +} + +#' RollingPercentileRank indicator +#' @keywords internal +#' @export +RollingPercentileRank <- function(period) { + ptr <- .Call("wk_rolling_percentile_rank_new", period, PACKAGE = "wickra") + .wk_obj("rolling_percentile_rank", ptr, "RollingPercentileRank") +} + +#' RollingQuantile indicator +#' @keywords internal +#' @export +RollingQuantile <- function(period, quantile) { + ptr <- .Call("wk_rolling_quantile_new", period, quantile, PACKAGE = "wickra") + .wk_obj("rolling_quantile", ptr, "RollingQuantile") +} + +#' RollingVwap indicator +#' @keywords internal +#' @export +RollingVwap <- function(period) { + ptr <- .Call("wk_rolling_vwap_new", period, PACKAGE = "wickra") + .wk_obj("rolling_vwap", ptr, "RollingVwap") +} + +#' RoofingFilter indicator +#' @keywords internal +#' @export +RoofingFilter <- function(lp_period, hp_period) { + ptr <- .Call("wk_roofing_filter_new", lp_period, hp_period, PACKAGE = "wickra") + .wk_obj("roofing_filter", ptr, "RoofingFilter") +} + +#' Rsi indicator +#' @keywords internal +#' @export +Rsi <- function(period) { + ptr <- .Call("wk_rsi_new", period, PACKAGE = "wickra") + .wk_obj("rsi", ptr, "Rsi") +} + +#' Rsx indicator +#' @keywords internal +#' @export +Rsx <- function(length) { + ptr <- .Call("wk_rsx_new", length, PACKAGE = "wickra") + .wk_obj("rsx", ptr, "Rsx") +} + +#' RunBars indicator +#' @keywords internal +#' @export +RunBars <- function(run_length) { + ptr <- .Call("wk_run_bars_new", run_length, PACKAGE = "wickra") + .wk_obj("run_bars", ptr, "RunBars") +} + +#' Rvi indicator +#' @keywords internal +#' @export +Rvi <- function(period) { + ptr <- .Call("wk_rvi_new", period, PACKAGE = "wickra") + .wk_obj("rvi", ptr, "Rvi") +} + +#' RviVolatility indicator +#' @keywords internal +#' @export +RviVolatility <- function(period) { + ptr <- .Call("wk_rvi_volatility_new", period, PACKAGE = "wickra") + .wk_obj("rvi_volatility", ptr, "RviVolatility") +} + +#' Rwi indicator +#' @keywords internal +#' @export +Rwi <- function(period) { + ptr <- .Call("wk_rwi_new", period, PACKAGE = "wickra") + .wk_obj("rwi", ptr, "Rwi") +} + +#' SampleEntropy indicator +#' @keywords internal +#' @export +SampleEntropy <- function(period, m, r_factor) { + ptr <- .Call("wk_sample_entropy_new", period, m, r_factor, PACKAGE = "wickra") + .wk_obj("sample_entropy", ptr, "SampleEntropy") +} + +#' SarExt indicator +#' @keywords internal +#' @export +SarExt <- function(start_value, offset_on_reverse, accel_init_long, accel_long, accel_max_long, accel_init_short, accel_short, accel_max_short) { + ptr <- .Call("wk_sar_ext_new", start_value, offset_on_reverse, accel_init_long, accel_long, accel_max_long, accel_init_short, accel_short, accel_max_short, PACKAGE = "wickra") + .wk_obj("sar_ext", ptr, "SarExt") +} + +#' SeasonalZScore indicator +#' @keywords internal +#' @export +SeasonalZScore <- function(utc_offset_minutes) { + ptr <- .Call("wk_seasonal_z_score_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("seasonal_z_score", ptr, "SeasonalZScore") +} + +#' SeparatingLines indicator +#' @keywords internal +#' @export +SeparatingLines <- function() { + ptr <- .Call("wk_separating_lines_new", PACKAGE = "wickra") + .wk_obj("separating_lines", ptr, "SeparatingLines") +} + +#' SessionHighLow indicator +#' @keywords internal +#' @export +SessionHighLow <- function(utc_offset_minutes) { + ptr <- .Call("wk_session_high_low_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("session_high_low", ptr, "SessionHighLow") +} + +#' SessionRange indicator +#' @keywords internal +#' @export +SessionRange <- function(utc_offset_minutes) { + ptr <- .Call("wk_session_range_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("session_range", ptr, "SessionRange") +} + +#' SessionVwap indicator +#' @keywords internal +#' @export +SessionVwap <- function(utc_offset_minutes) { + ptr <- .Call("wk_session_vwap_new", utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("session_vwap", ptr, "SessionVwap") +} + +#' ShannonEntropy indicator +#' @keywords internal +#' @export +ShannonEntropy <- function(period, bins) { + ptr <- .Call("wk_shannon_entropy_new", period, bins, PACKAGE = "wickra") + .wk_obj("shannon_entropy", ptr, "ShannonEntropy") +} + +#' Shark indicator +#' @keywords internal +#' @export +Shark <- function() { + ptr <- .Call("wk_shark_new", PACKAGE = "wickra") + .wk_obj("shark", ptr, "Shark") +} + +#' SharpeRatio indicator +#' @keywords internal +#' @export +SharpeRatio <- function(period, risk_free) { + ptr <- .Call("wk_sharpe_ratio_new", period, risk_free, PACKAGE = "wickra") + .wk_obj("sharpe_ratio", ptr, "SharpeRatio") +} + +#' ShootingStar indicator +#' @keywords internal +#' @export +ShootingStar <- function() { + ptr <- .Call("wk_shooting_star_new", PACKAGE = "wickra") + .wk_obj("shooting_star", ptr, "ShootingStar") +} + +#' ShortLine indicator +#' @keywords internal +#' @export +ShortLine <- function() { + ptr <- .Call("wk_short_line_new", PACKAGE = "wickra") + .wk_obj("short_line", ptr, "ShortLine") +} + +#' SignedVolume indicator +#' @keywords internal +#' @export +SignedVolume <- function() { + ptr <- .Call("wk_signed_volume_new", PACKAGE = "wickra") + .wk_obj("signed_volume", ptr, "SignedVolume") +} + +#' SineWave indicator +#' @keywords internal +#' @export +SineWave <- function() { + ptr <- .Call("wk_sine_wave_new", PACKAGE = "wickra") + .wk_obj("sine_wave", ptr, "SineWave") +} + +#' SineWeightedMa indicator +#' @keywords internal +#' @export +SineWeightedMa <- function(period) { + ptr <- .Call("wk_sine_weighted_ma_new", period, PACKAGE = "wickra") + .wk_obj("sine_weighted_ma", ptr, "SineWeightedMa") +} + +#' SinglePrints indicator +#' @keywords internal +#' @export +SinglePrints <- function(period, bins) { + ptr <- .Call("wk_single_prints_new", period, bins, PACKAGE = "wickra") + .wk_obj("single_prints", ptr, "SinglePrints") +} + +#' Skewness indicator +#' @keywords internal +#' @export +Skewness <- function(period) { + ptr <- .Call("wk_skewness_new", period, PACKAGE = "wickra") + .wk_obj("skewness", ptr, "Skewness") +} + +#' Sma indicator +#' @keywords internal +#' @export +Sma <- function(period) { + ptr <- .Call("wk_sma_new", period, PACKAGE = "wickra") + .wk_obj("sma", ptr, "Sma") +} + +#' Smi indicator +#' @keywords internal +#' @export +Smi <- function(period, d_period, d2_period) { + ptr <- .Call("wk_smi_new", period, d_period, d2_period, PACKAGE = "wickra") + .wk_obj("smi", ptr, "Smi") +} + +#' Smma indicator +#' @keywords internal +#' @export +Smma <- function(period) { + ptr <- .Call("wk_smma_new", period, PACKAGE = "wickra") + .wk_obj("smma", ptr, "Smma") +} + +#' SmoothedHeikinAshi indicator +#' @keywords internal +#' @export +SmoothedHeikinAshi <- function(period) { + ptr <- .Call("wk_smoothed_heikin_ashi_new", period, PACKAGE = "wickra") + .wk_obj("smoothed_heikin_ashi", ptr, "SmoothedHeikinAshi") +} + +#' SortinoRatio indicator +#' @keywords internal +#' @export +SortinoRatio <- function(period, mar) { + ptr <- .Call("wk_sortino_ratio_new", period, mar, PACKAGE = "wickra") + .wk_obj("sortino_ratio", ptr, "SortinoRatio") +} + +#' SpearmanCorrelation indicator +#' @keywords internal +#' @export +SpearmanCorrelation <- function(period) { + ptr <- .Call("wk_spearman_correlation_new", period, PACKAGE = "wickra") + .wk_obj("spearman_correlation", ptr, "SpearmanCorrelation") +} + +#' SpinningTop indicator +#' @keywords internal +#' @export +SpinningTop <- function() { + ptr <- .Call("wk_spinning_top_new", PACKAGE = "wickra") + .wk_obj("spinning_top", ptr, "SpinningTop") +} + +#' SpreadAr1Coefficient indicator +#' @keywords internal +#' @export +SpreadAr1Coefficient <- function(period) { + ptr <- .Call("wk_spread_ar1_coefficient_new", period, PACKAGE = "wickra") + .wk_obj("spread_ar1_coefficient", ptr, "SpreadAr1Coefficient") +} + +#' SpreadBollingerBands indicator +#' @keywords internal +#' @export +SpreadBollingerBands <- function(period, num_std) { + ptr <- .Call("wk_spread_bollinger_bands_new", period, num_std, PACKAGE = "wickra") + .wk_obj("spread_bollinger_bands", ptr, "SpreadBollingerBands") +} + +#' SpreadHurst indicator +#' @keywords internal +#' @export +SpreadHurst <- function(period) { + ptr <- .Call("wk_spread_hurst_new", period, PACKAGE = "wickra") + .wk_obj("spread_hurst", ptr, "SpreadHurst") +} + +#' StalledPattern indicator +#' @keywords internal +#' @export +StalledPattern <- function() { + ptr <- .Call("wk_stalled_pattern_new", PACKAGE = "wickra") + .wk_obj("stalled_pattern", ptr, "StalledPattern") +} + +#' StandardError indicator +#' @keywords internal +#' @export +StandardError <- function(period) { + ptr <- .Call("wk_standard_error_new", period, PACKAGE = "wickra") + .wk_obj("standard_error", ptr, "StandardError") +} + +#' StandardErrorBands indicator +#' @keywords internal +#' @export +StandardErrorBands <- function(period, multiplier) { + ptr <- .Call("wk_standard_error_bands_new", period, multiplier, PACKAGE = "wickra") + .wk_obj("standard_error_bands", ptr, "StandardErrorBands") +} + +#' StarcBands indicator +#' @keywords internal +#' @export +StarcBands <- function(sma_period, atr_period, multiplier) { + ptr <- .Call("wk_starc_bands_new", sma_period, atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("starc_bands", ptr, "StarcBands") +} + +#' Stc indicator +#' @keywords internal +#' @export +Stc <- function(fast, slow, schaff_period, factor) { + ptr <- .Call("wk_stc_new", fast, slow, schaff_period, factor, PACKAGE = "wickra") + .wk_obj("stc", ptr, "Stc") +} + +#' StdDev indicator +#' @keywords internal +#' @export +StdDev <- function(period) { + ptr <- .Call("wk_std_dev_new", period, PACKAGE = "wickra") + .wk_obj("std_dev", ptr, "StdDev") +} + +#' StepTrailingStop indicator +#' @keywords internal +#' @export +StepTrailingStop <- function(step_size) { + ptr <- .Call("wk_step_trailing_stop_new", step_size, PACKAGE = "wickra") + .wk_obj("step_trailing_stop", ptr, "StepTrailingStop") +} + +#' SterlingRatio indicator +#' @keywords internal +#' @export +SterlingRatio <- function(period) { + ptr <- .Call("wk_sterling_ratio_new", period, PACKAGE = "wickra") + .wk_obj("sterling_ratio", ptr, "SterlingRatio") +} + +#' StickSandwich indicator +#' @keywords internal +#' @export +StickSandwich <- function() { + ptr <- .Call("wk_stick_sandwich_new", PACKAGE = "wickra") + .wk_obj("stick_sandwich", ptr, "StickSandwich") +} + +#' StochRsi indicator +#' @keywords internal +#' @export +StochRsi <- function(rsi_period, stoch_period) { + ptr <- .Call("wk_stoch_rsi_new", rsi_period, stoch_period, PACKAGE = "wickra") + .wk_obj("stoch_rsi", ptr, "StochRsi") +} + +#' Stochastic indicator +#' @keywords internal +#' @export +Stochastic <- function(k_period, d_period) { + ptr <- .Call("wk_stochastic_new", k_period, d_period, PACKAGE = "wickra") + .wk_obj("stochastic", ptr, "Stochastic") +} + +#' StochasticCci indicator +#' @keywords internal +#' @export +StochasticCci <- function(period) { + ptr <- .Call("wk_stochastic_cci_new", period, PACKAGE = "wickra") + .wk_obj("stochastic_cci", ptr, "StochasticCci") +} + +#' SuperSmoother indicator +#' @keywords internal +#' @export +SuperSmoother <- function(period) { + ptr <- .Call("wk_super_smoother_new", period, PACKAGE = "wickra") + .wk_obj("super_smoother", ptr, "SuperSmoother") +} + +#' SuperTrend indicator +#' @keywords internal +#' @export +SuperTrend <- function(atr_period, multiplier) { + ptr <- .Call("wk_super_trend_new", atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("super_trend", ptr, "SuperTrend") +} + +#' T3 indicator +#' @keywords internal +#' @export +T3 <- function(period, v) { + ptr <- .Call("wk_t3_new", period, v, PACKAGE = "wickra") + .wk_obj("t3", ptr, "T3") +} + +#' TailRatio indicator +#' @keywords internal +#' @export +TailRatio <- function(period) { + ptr <- .Call("wk_tail_ratio_new", period, PACKAGE = "wickra") + .wk_obj("tail_ratio", ptr, "TailRatio") +} + +#' TakerBuySellRatio indicator +#' @keywords internal +#' @export +TakerBuySellRatio <- function() { + ptr <- .Call("wk_taker_buy_sell_ratio_new", PACKAGE = "wickra") + .wk_obj("taker_buy_sell_ratio", ptr, "TakerBuySellRatio") +} + +#' Takuri indicator +#' @keywords internal +#' @export +Takuri <- function() { + ptr <- .Call("wk_takuri_new", PACKAGE = "wickra") + .wk_obj("takuri", ptr, "Takuri") +} + +#' TasukiGap indicator +#' @keywords internal +#' @export +TasukiGap <- function() { + ptr <- .Call("wk_tasuki_gap_new", PACKAGE = "wickra") + .wk_obj("tasuki_gap", ptr, "TasukiGap") +} + +#' TdCamouflage indicator +#' @keywords internal +#' @export +TdCamouflage <- function() { + ptr <- .Call("wk_td_camouflage_new", PACKAGE = "wickra") + .wk_obj("td_camouflage", ptr, "TdCamouflage") +} + +#' TdClop indicator +#' @keywords internal +#' @export +TdClop <- function() { + ptr <- .Call("wk_td_clop_new", PACKAGE = "wickra") + .wk_obj("td_clop", ptr, "TdClop") +} + +#' TdClopwin indicator +#' @keywords internal +#' @export +TdClopwin <- function() { + ptr <- .Call("wk_td_clopwin_new", PACKAGE = "wickra") + .wk_obj("td_clopwin", ptr, "TdClopwin") +} + +#' TdCombo indicator +#' @keywords internal +#' @export +TdCombo <- function(setup_lookback, setup_target, countdown_lookback, countdown_target) { + ptr <- .Call("wk_td_combo_new", setup_lookback, setup_target, countdown_lookback, countdown_target, PACKAGE = "wickra") + .wk_obj("td_combo", ptr, "TdCombo") +} + +#' TdCountdown indicator +#' @keywords internal +#' @export +TdCountdown <- function(setup_lookback, setup_target, countdown_lookback, countdown_target) { + ptr <- .Call("wk_td_countdown_new", setup_lookback, setup_target, countdown_lookback, countdown_target, PACKAGE = "wickra") + .wk_obj("td_countdown", ptr, "TdCountdown") +} + +#' TdDWave indicator +#' @keywords internal +#' @export +TdDWave <- function(strength) { + ptr <- .Call("wk_td_d_wave_new", strength, PACKAGE = "wickra") + .wk_obj("td_d_wave", ptr, "TdDWave") +} + +#' TdDeMarker indicator +#' @keywords internal +#' @export +TdDeMarker <- function(period) { + ptr <- .Call("wk_td_de_marker_new", period, PACKAGE = "wickra") + .wk_obj("td_de_marker", ptr, "TdDeMarker") +} + +#' TdDifferential indicator +#' @keywords internal +#' @export +TdDifferential <- function() { + ptr <- .Call("wk_td_differential_new", PACKAGE = "wickra") + .wk_obj("td_differential", ptr, "TdDifferential") +} + +#' TdLines indicator +#' @keywords internal +#' @export +TdLines <- function(lookback, target) { + ptr <- .Call("wk_td_lines_new", lookback, target, PACKAGE = "wickra") + .wk_obj("td_lines", ptr, "TdLines") +} + +#' TdMovingAverage indicator +#' @keywords internal +#' @export +TdMovingAverage <- function(period_st1, period_st2) { + ptr <- .Call("wk_td_moving_average_new", period_st1, period_st2, PACKAGE = "wickra") + .wk_obj("td_moving_average", ptr, "TdMovingAverage") +} + +#' TdOpen indicator +#' @keywords internal +#' @export +TdOpen <- function() { + ptr <- .Call("wk_td_open_new", PACKAGE = "wickra") + .wk_obj("td_open", ptr, "TdOpen") +} + +#' TdPressure indicator +#' @keywords internal +#' @export +TdPressure <- function(period) { + ptr <- .Call("wk_td_pressure_new", period, PACKAGE = "wickra") + .wk_obj("td_pressure", ptr, "TdPressure") +} + +#' TdPropulsion indicator +#' @keywords internal +#' @export +TdPropulsion <- function() { + ptr <- .Call("wk_td_propulsion_new", PACKAGE = "wickra") + .wk_obj("td_propulsion", ptr, "TdPropulsion") +} + +#' TdRangeProjection indicator +#' @keywords internal +#' @export +TdRangeProjection <- function() { + ptr <- .Call("wk_td_range_projection_new", PACKAGE = "wickra") + .wk_obj("td_range_projection", ptr, "TdRangeProjection") +} + +#' TdRei indicator +#' @keywords internal +#' @export +TdRei <- function(period) { + ptr <- .Call("wk_td_rei_new", period, PACKAGE = "wickra") + .wk_obj("td_rei", ptr, "TdRei") +} + +#' TdRiskLevel indicator +#' @keywords internal +#' @export +TdRiskLevel <- function(lookback, target) { + ptr <- .Call("wk_td_risk_level_new", lookback, target, PACKAGE = "wickra") + .wk_obj("td_risk_level", ptr, "TdRiskLevel") +} + +#' TdSequential indicator +#' @keywords internal +#' @export +TdSequential <- function(setup_lookback, setup_target, countdown_lookback, countdown_target) { + ptr <- .Call("wk_td_sequential_new", setup_lookback, setup_target, countdown_lookback, countdown_target, PACKAGE = "wickra") + .wk_obj("td_sequential", ptr, "TdSequential") +} + +#' TdSetup indicator +#' @keywords internal +#' @export +TdSetup <- function(lookback, target) { + ptr <- .Call("wk_td_setup_new", lookback, target, PACKAGE = "wickra") + .wk_obj("td_setup", ptr, "TdSetup") +} + +#' TdTrap indicator +#' @keywords internal +#' @export +TdTrap <- function() { + ptr <- .Call("wk_td_trap_new", PACKAGE = "wickra") + .wk_obj("td_trap", ptr, "TdTrap") +} + +#' Tema indicator +#' @keywords internal +#' @export +Tema <- function(period) { + ptr <- .Call("wk_tema_new", period, PACKAGE = "wickra") + .wk_obj("tema", ptr, "Tema") +} + +#' TermStructureBasis indicator +#' @keywords internal +#' @export +TermStructureBasis <- function() { + ptr <- .Call("wk_term_structure_basis_new", PACKAGE = "wickra") + .wk_obj("term_structure_basis", ptr, "TermStructureBasis") +} + +#' ThreeDrives indicator +#' @keywords internal +#' @export +ThreeDrives <- function() { + ptr <- .Call("wk_three_drives_new", PACKAGE = "wickra") + .wk_obj("three_drives", ptr, "ThreeDrives") +} + +#' ThreeInside indicator +#' @keywords internal +#' @export +ThreeInside <- function() { + ptr <- .Call("wk_three_inside_new", PACKAGE = "wickra") + .wk_obj("three_inside", ptr, "ThreeInside") +} + +#' ThreeLineBreak indicator +#' @keywords internal +#' @export +ThreeLineBreak <- function(lines) { + ptr <- .Call("wk_three_line_break_new", lines, PACKAGE = "wickra") + .wk_obj("three_line_break", ptr, "ThreeLineBreak") +} + +#' ThreeLineBreakBars indicator +#' @keywords internal +#' @export +ThreeLineBreakBars <- function(lines) { + ptr <- .Call("wk_three_line_break_bars_new", lines, PACKAGE = "wickra") + .wk_obj("three_line_break_bars", ptr, "ThreeLineBreakBars") +} + +#' ThreeLineStrike indicator +#' @keywords internal +#' @export +ThreeLineStrike <- function() { + ptr <- .Call("wk_three_line_strike_new", PACKAGE = "wickra") + .wk_obj("three_line_strike", ptr, "ThreeLineStrike") +} + +#' ThreeOutside indicator +#' @keywords internal +#' @export +ThreeOutside <- function() { + ptr <- .Call("wk_three_outside_new", PACKAGE = "wickra") + .wk_obj("three_outside", ptr, "ThreeOutside") +} + +#' ThreeSoldiersOrCrows indicator +#' @keywords internal +#' @export +ThreeSoldiersOrCrows <- function() { + ptr <- .Call("wk_three_soldiers_or_crows_new", PACKAGE = "wickra") + .wk_obj("three_soldiers_or_crows", ptr, "ThreeSoldiersOrCrows") +} + +#' ThreeStarsInSouth indicator +#' @keywords internal +#' @export +ThreeStarsInSouth <- function() { + ptr <- .Call("wk_three_stars_in_south_new", PACKAGE = "wickra") + .wk_obj("three_stars_in_south", ptr, "ThreeStarsInSouth") +} + +#' Thrusting indicator +#' @keywords internal +#' @export +Thrusting <- function() { + ptr <- .Call("wk_thrusting_new", PACKAGE = "wickra") + .wk_obj("thrusting", ptr, "Thrusting") +} + +#' TickBars indicator +#' @keywords internal +#' @export +TickBars <- function(ticks) { + ptr <- .Call("wk_tick_bars_new", ticks, PACKAGE = "wickra") + .wk_obj("tick_bars", ptr, "TickBars") +} + +#' TickIndex indicator +#' @keywords internal +#' @export +TickIndex <- function() { + ptr <- .Call("wk_tick_index_new", PACKAGE = "wickra") + .wk_obj("tick_index", ptr, "TickIndex") +} + +#' Tii indicator +#' @keywords internal +#' @export +Tii <- function(sma_period, dev_period) { + ptr <- .Call("wk_tii_new", sma_period, dev_period, PACKAGE = "wickra") + .wk_obj("tii", ptr, "Tii") +} + +#' TimeBasedStop indicator +#' @keywords internal +#' @export +TimeBasedStop <- function(max_bars) { + ptr <- .Call("wk_time_based_stop_new", max_bars, PACKAGE = "wickra") + .wk_obj("time_based_stop", ptr, "TimeBasedStop") +} + +#' TimeOfDayReturnProfile indicator +#' @keywords internal +#' @export +TimeOfDayReturnProfile <- function(buckets, utc_offset_minutes) { + ptr <- .Call("wk_time_of_day_return_profile_new", buckets, utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("time_of_day_return_profile", ptr, "TimeOfDayReturnProfile", values_cap = as.integer(buckets)) +} + +#' TowerTopBottom indicator +#' @keywords internal +#' @export +TowerTopBottom <- function() { + ptr <- .Call("wk_tower_top_bottom_new", PACKAGE = "wickra") + .wk_obj("tower_top_bottom", ptr, "TowerTopBottom") +} + +#' TpoProfile indicator +#' @keywords internal +#' @export +TpoProfile <- function(period, bin_count) { + ptr <- .Call("wk_tpo_profile_new", period, bin_count, PACKAGE = "wickra") + .wk_obj("tpo_profile", ptr, "TpoProfile", values_cap = as.integer(bin_count)) +} + +#' TradeImbalance indicator +#' @keywords internal +#' @export +TradeImbalance <- function(window) { + ptr <- .Call("wk_trade_imbalance_new", window, PACKAGE = "wickra") + .wk_obj("trade_imbalance", ptr, "TradeImbalance") +} + +#' TradeSignAutocorrelation indicator +#' @keywords internal +#' @export +TradeSignAutocorrelation <- function(period) { + ptr <- .Call("wk_trade_sign_autocorrelation_new", period, PACKAGE = "wickra") + .wk_obj("trade_sign_autocorrelation", ptr, "TradeSignAutocorrelation") +} + +#' TradeVolumeIndex indicator +#' @keywords internal +#' @export +TradeVolumeIndex <- function(min_tick) { + ptr <- .Call("wk_trade_volume_index_new", min_tick, PACKAGE = "wickra") + .wk_obj("trade_volume_index", ptr, "TradeVolumeIndex") +} + +#' TrendLabel indicator +#' @keywords internal +#' @export +TrendLabel <- function(period) { + ptr <- .Call("wk_trend_label_new", period, PACKAGE = "wickra") + .wk_obj("trend_label", ptr, "TrendLabel") +} + +#' TrendStrengthIndex indicator +#' @keywords internal +#' @export +TrendStrengthIndex <- function(period) { + ptr <- .Call("wk_trend_strength_index_new", period, PACKAGE = "wickra") + .wk_obj("trend_strength_index", ptr, "TrendStrengthIndex") +} + +#' Trendflex indicator +#' @keywords internal +#' @export +Trendflex <- function(period) { + ptr <- .Call("wk_trendflex_new", period, PACKAGE = "wickra") + .wk_obj("trendflex", ptr, "Trendflex") +} + +#' TreynorRatio indicator +#' @keywords internal +#' @export +TreynorRatio <- function(period, risk_free) { + ptr <- .Call("wk_treynor_ratio_new", period, risk_free, PACKAGE = "wickra") + .wk_obj("treynor_ratio", ptr, "TreynorRatio") +} + +#' Triangle indicator +#' @keywords internal +#' @export +Triangle <- function() { + ptr <- .Call("wk_triangle_new", PACKAGE = "wickra") + .wk_obj("triangle", ptr, "Triangle") +} + +#' Trima indicator +#' @keywords internal +#' @export +Trima <- function(period) { + ptr <- .Call("wk_trima_new", period, PACKAGE = "wickra") + .wk_obj("trima", ptr, "Trima") +} + +#' Trin indicator +#' @keywords internal +#' @export +Trin <- function() { + ptr <- .Call("wk_trin_new", PACKAGE = "wickra") + .wk_obj("trin", ptr, "Trin") +} + +#' TripleTopBottom indicator +#' @keywords internal +#' @export +TripleTopBottom <- function() { + ptr <- .Call("wk_triple_top_bottom_new", PACKAGE = "wickra") + .wk_obj("triple_top_bottom", ptr, "TripleTopBottom") +} + +#' Tristar indicator +#' @keywords internal +#' @export +Tristar <- function() { + ptr <- .Call("wk_tristar_new", PACKAGE = "wickra") + .wk_obj("tristar", ptr, "Tristar") +} + +#' Trix indicator +#' @keywords internal +#' @export +Trix <- function(period) { + ptr <- .Call("wk_trix_new", period, PACKAGE = "wickra") + .wk_obj("trix", ptr, "Trix") +} + +#' TrueRange indicator +#' @keywords internal +#' @export +TrueRange <- function() { + ptr <- .Call("wk_true_range_new", PACKAGE = "wickra") + .wk_obj("true_range", ptr, "TrueRange") +} + +#' Tsf indicator +#' @keywords internal +#' @export +Tsf <- function(period) { + ptr <- .Call("wk_tsf_new", period, PACKAGE = "wickra") + .wk_obj("tsf", ptr, "Tsf") +} + +#' TsfOscillator indicator +#' @keywords internal +#' @export +TsfOscillator <- function(period) { + ptr <- .Call("wk_tsf_oscillator_new", period, PACKAGE = "wickra") + .wk_obj("tsf_oscillator", ptr, "TsfOscillator") +} + +#' Tsi indicator +#' @keywords internal +#' @export +Tsi <- function(long_, short_) { + ptr <- .Call("wk_tsi_new", long_, short_, PACKAGE = "wickra") + .wk_obj("tsi", ptr, "Tsi") +} + +#' Tsv indicator +#' @keywords internal +#' @export +Tsv <- function(period) { + ptr <- .Call("wk_tsv_new", period, PACKAGE = "wickra") + .wk_obj("tsv", ptr, "Tsv") +} + +#' TtmSqueeze indicator +#' @keywords internal +#' @export +TtmSqueeze <- function(period, bb_mult, kc_mult) { + ptr <- .Call("wk_ttm_squeeze_new", period, bb_mult, kc_mult, PACKAGE = "wickra") + .wk_obj("ttm_squeeze", ptr, "TtmSqueeze") +} + +#' TtmTrend indicator +#' @keywords internal +#' @export +TtmTrend <- function(period) { + ptr <- .Call("wk_ttm_trend_new", period, PACKAGE = "wickra") + .wk_obj("ttm_trend", ptr, "TtmTrend") +} + +#' TurnOfMonth indicator +#' @keywords internal +#' @export +TurnOfMonth <- function(n_first, n_last, utc_offset_minutes) { + ptr <- .Call("wk_turn_of_month_new", n_first, n_last, utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("turn_of_month", ptr, "TurnOfMonth") +} + +#' Tweezer indicator +#' @keywords internal +#' @export +Tweezer <- function() { + ptr <- .Call("wk_tweezer_new", PACKAGE = "wickra") + .wk_obj("tweezer", ptr, "Tweezer") +} + +#' TwiggsMoneyFlow indicator +#' @keywords internal +#' @export +TwiggsMoneyFlow <- function(period) { + ptr <- .Call("wk_twiggs_money_flow_new", period, PACKAGE = "wickra") + .wk_obj("twiggs_money_flow", ptr, "TwiggsMoneyFlow") +} + +#' TwoCrows indicator +#' @keywords internal +#' @export +TwoCrows <- function() { + ptr <- .Call("wk_two_crows_new", PACKAGE = "wickra") + .wk_obj("two_crows", ptr, "TwoCrows") +} + +#' TypicalPrice indicator +#' @keywords internal +#' @export +TypicalPrice <- function() { + ptr <- .Call("wk_typical_price_new", PACKAGE = "wickra") + .wk_obj("typical_price", ptr, "TypicalPrice") +} + +#' UlcerIndex indicator +#' @keywords internal +#' @export +UlcerIndex <- function(period) { + ptr <- .Call("wk_ulcer_index_new", period, PACKAGE = "wickra") + .wk_obj("ulcer_index", ptr, "UlcerIndex") +} + +#' UltimateOscillator indicator +#' @keywords internal +#' @export +UltimateOscillator <- function(short_, mid, long_) { + ptr <- .Call("wk_ultimate_oscillator_new", short_, mid, long_, PACKAGE = "wickra") + .wk_obj("ultimate_oscillator", ptr, "UltimateOscillator") +} + +#' UniqueThreeRiver indicator +#' @keywords internal +#' @export +UniqueThreeRiver <- function() { + ptr <- .Call("wk_unique_three_river_new", PACKAGE = "wickra") + .wk_obj("unique_three_river", ptr, "UniqueThreeRiver") +} + +#' UniversalOscillator indicator +#' @keywords internal +#' @export +UniversalOscillator <- function(period) { + ptr <- .Call("wk_universal_oscillator_new", period, PACKAGE = "wickra") + .wk_obj("universal_oscillator", ptr, "UniversalOscillator") +} + +#' UpDownVolumeRatio indicator +#' @keywords internal +#' @export +UpDownVolumeRatio <- function() { + ptr <- .Call("wk_up_down_volume_ratio_new", PACKAGE = "wickra") + .wk_obj("up_down_volume_ratio", ptr, "UpDownVolumeRatio") +} + +#' UpsideGapThreeMethods indicator +#' @keywords internal +#' @export +UpsideGapThreeMethods <- function() { + ptr <- .Call("wk_upside_gap_three_methods_new", PACKAGE = "wickra") + .wk_obj("upside_gap_three_methods", ptr, "UpsideGapThreeMethods") +} + +#' UpsideGapTwoCrows indicator +#' @keywords internal +#' @export +UpsideGapTwoCrows <- function() { + ptr <- .Call("wk_upside_gap_two_crows_new", PACKAGE = "wickra") + .wk_obj("upside_gap_two_crows", ptr, "UpsideGapTwoCrows") +} + +#' UpsidePotentialRatio indicator +#' @keywords internal +#' @export +UpsidePotentialRatio <- function(period, mar) { + ptr <- .Call("wk_upside_potential_ratio_new", period, mar, PACKAGE = "wickra") + .wk_obj("upside_potential_ratio", ptr, "UpsidePotentialRatio") +} + +#' ValueArea indicator +#' @keywords internal +#' @export +ValueArea <- function(period, bin_count, value_area_pct) { + ptr <- .Call("wk_value_area_new", period, bin_count, value_area_pct, PACKAGE = "wickra") + .wk_obj("value_area", ptr, "ValueArea") +} + +#' ValueAtRisk indicator +#' @keywords internal +#' @export +ValueAtRisk <- function(period, confidence) { + ptr <- .Call("wk_value_at_risk_new", period, confidence, PACKAGE = "wickra") + .wk_obj("value_at_risk", ptr, "ValueAtRisk") +} + +#' Variance indicator +#' @keywords internal +#' @export +Variance <- function(period) { + ptr <- .Call("wk_variance_new", period, PACKAGE = "wickra") + .wk_obj("variance", ptr, "Variance") +} + +#' VarianceRatio indicator +#' @keywords internal +#' @export +VarianceRatio <- function(period, q) { + ptr <- .Call("wk_variance_ratio_new", period, q, PACKAGE = "wickra") + .wk_obj("variance_ratio", ptr, "VarianceRatio") +} + +#' VerticalHorizontalFilter indicator +#' @keywords internal +#' @export +VerticalHorizontalFilter <- function(period) { + ptr <- .Call("wk_vertical_horizontal_filter_new", period, PACKAGE = "wickra") + .wk_obj("vertical_horizontal_filter", ptr, "VerticalHorizontalFilter") +} + +#' Vidya indicator +#' @keywords internal +#' @export +Vidya <- function(period, cmo_period) { + ptr <- .Call("wk_vidya_new", period, cmo_period, PACKAGE = "wickra") + .wk_obj("vidya", ptr, "Vidya") +} + +#' VolatilityCone indicator +#' @keywords internal +#' @export +VolatilityCone <- function(window, lookback) { + ptr <- .Call("wk_volatility_cone_new", window, lookback, PACKAGE = "wickra") + .wk_obj("volatility_cone", ptr, "VolatilityCone") +} + +#' VolatilityOfVolatility indicator +#' @keywords internal +#' @export +VolatilityOfVolatility <- function(vol_window, vov_window) { + ptr <- .Call("wk_volatility_of_volatility_new", vol_window, vov_window, PACKAGE = "wickra") + .wk_obj("volatility_of_volatility", ptr, "VolatilityOfVolatility") +} + +#' VolatilityRatio indicator +#' @keywords internal +#' @export +VolatilityRatio <- function(period) { + ptr <- .Call("wk_volatility_ratio_new", period, PACKAGE = "wickra") + .wk_obj("volatility_ratio", ptr, "VolatilityRatio") +} + +#' VoltyStop indicator +#' @keywords internal +#' @export +VoltyStop <- function(atr_period, multiplier) { + ptr <- .Call("wk_volty_stop_new", atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("volty_stop", ptr, "VoltyStop") +} + +#' VolumeBars indicator +#' @keywords internal +#' @export +VolumeBars <- function(volume_per_bar) { + ptr <- .Call("wk_volume_bars_new", volume_per_bar, PACKAGE = "wickra") + .wk_obj("volume_bars", ptr, "VolumeBars") +} + +#' VolumeByTimeProfile indicator +#' @keywords internal +#' @export +VolumeByTimeProfile <- function(buckets, utc_offset_minutes) { + ptr <- .Call("wk_volume_by_time_profile_new", buckets, utc_offset_minutes, PACKAGE = "wickra") + .wk_obj("volume_by_time_profile", ptr, "VolumeByTimeProfile", values_cap = as.integer(buckets)) +} + +#' VolumeOscillator indicator +#' @keywords internal +#' @export +VolumeOscillator <- function(fast, slow) { + ptr <- .Call("wk_volume_oscillator_new", fast, slow, PACKAGE = "wickra") + .wk_obj("volume_oscillator", ptr, "VolumeOscillator") +} + +#' VolumePriceTrend indicator +#' @keywords internal +#' @export +VolumePriceTrend <- function() { + ptr <- .Call("wk_volume_price_trend_new", PACKAGE = "wickra") + .wk_obj("volume_price_trend", ptr, "VolumePriceTrend") +} + +#' VolumeProfile indicator +#' @keywords internal +#' @export +VolumeProfile <- function(period, bin_count) { + ptr <- .Call("wk_volume_profile_new", period, bin_count, PACKAGE = "wickra") + .wk_obj("volume_profile", ptr, "VolumeProfile", values_cap = as.integer(bin_count)) +} + +#' VolumeRsi indicator +#' @keywords internal +#' @export +VolumeRsi <- function(period) { + ptr <- .Call("wk_volume_rsi_new", period, PACKAGE = "wickra") + .wk_obj("volume_rsi", ptr, "VolumeRsi") +} + +#' VolumeWeightedMacd indicator +#' @keywords internal +#' @export +VolumeWeightedMacd <- function(fast, slow, signal) { + ptr <- .Call("wk_volume_weighted_macd_new", fast, slow, signal, PACKAGE = "wickra") + .wk_obj("volume_weighted_macd", ptr, "VolumeWeightedMacd") +} + +#' VolumeWeightedSr indicator +#' @keywords internal +#' @export +VolumeWeightedSr <- function(period) { + ptr <- .Call("wk_volume_weighted_sr_new", period, PACKAGE = "wickra") + .wk_obj("volume_weighted_sr", ptr, "VolumeWeightedSr") +} + +#' Vortex indicator +#' @keywords internal +#' @export +Vortex <- function(period) { + ptr <- .Call("wk_vortex_new", period, PACKAGE = "wickra") + .wk_obj("vortex", ptr, "Vortex") +} + +#' Vpin indicator +#' @keywords internal +#' @export +Vpin <- function(bucket_volume, num_buckets) { + ptr <- .Call("wk_vpin_new", bucket_volume, num_buckets, PACKAGE = "wickra") + .wk_obj("vpin", ptr, "Vpin") +} + +#' Vwap indicator +#' @keywords internal +#' @export +Vwap <- function() { + ptr <- .Call("wk_vwap_new", PACKAGE = "wickra") + .wk_obj("vwap", ptr, "Vwap") +} + +#' VwapStdDevBands indicator +#' @keywords internal +#' @export +VwapStdDevBands <- function(multiplier) { + ptr <- .Call("wk_vwap_std_dev_bands_new", multiplier, PACKAGE = "wickra") + .wk_obj("vwap_std_dev_bands", ptr, "VwapStdDevBands") +} + +#' Vwma indicator +#' @keywords internal +#' @export +Vwma <- function(period) { + ptr <- .Call("wk_vwma_new", period, PACKAGE = "wickra") + .wk_obj("vwma", ptr, "Vwma") +} + +#' Vzo indicator +#' @keywords internal +#' @export +Vzo <- function(period) { + ptr <- .Call("wk_vzo_new", period, PACKAGE = "wickra") + .wk_obj("vzo", ptr, "Vzo") +} + +#' Wad indicator +#' @keywords internal +#' @export +Wad <- function() { + ptr <- .Call("wk_wad_new", PACKAGE = "wickra") + .wk_obj("wad", ptr, "Wad") +} + +#' WavePm indicator +#' @keywords internal +#' @export +WavePm <- function(length, smoothing) { + ptr <- .Call("wk_wave_pm_new", length, smoothing, PACKAGE = "wickra") + .wk_obj("wave_pm", ptr, "WavePm") +} + +#' WaveTrend indicator +#' @keywords internal +#' @export +WaveTrend <- function(channel_period, average_period, signal_period) { + ptr <- .Call("wk_wave_trend_new", channel_period, average_period, signal_period, PACKAGE = "wickra") + .wk_obj("wave_trend", ptr, "WaveTrend") +} + +#' Wedge indicator +#' @keywords internal +#' @export +Wedge <- function() { + ptr <- .Call("wk_wedge_new", PACKAGE = "wickra") + .wk_obj("wedge", ptr, "Wedge") +} + +#' WeightedClose indicator +#' @keywords internal +#' @export +WeightedClose <- function() { + ptr <- .Call("wk_weighted_close_new", PACKAGE = "wickra") + .wk_obj("weighted_close", ptr, "WeightedClose") +} + +#' WickRatio indicator +#' @keywords internal +#' @export +WickRatio <- function() { + ptr <- .Call("wk_wick_ratio_new", PACKAGE = "wickra") + .wk_obj("wick_ratio", ptr, "WickRatio") +} + +#' WilliamsFractals indicator +#' @keywords internal +#' @export +WilliamsFractals <- function() { + ptr <- .Call("wk_williams_fractals_new", PACKAGE = "wickra") + .wk_obj("williams_fractals", ptr, "WilliamsFractals") +} + +#' WilliamsR indicator +#' @keywords internal +#' @export +WilliamsR <- function(period) { + ptr <- .Call("wk_williams_r_new", period, PACKAGE = "wickra") + .wk_obj("williams_r", ptr, "WilliamsR") +} + +#' WinRate indicator +#' @keywords internal +#' @export +WinRate <- function(period) { + ptr <- .Call("wk_win_rate_new", period, PACKAGE = "wickra") + .wk_obj("win_rate", ptr, "WinRate") +} + +#' Wma indicator +#' @keywords internal +#' @export +Wma <- function(period) { + ptr <- .Call("wk_wma_new", period, PACKAGE = "wickra") + .wk_obj("wma", ptr, "Wma") +} + +#' WoodiePivots indicator +#' @keywords internal +#' @export +WoodiePivots <- function() { + ptr <- .Call("wk_woodie_pivots_new", PACKAGE = "wickra") + .wk_obj("woodie_pivots", ptr, "WoodiePivots") +} + +#' YangZhangVolatility indicator +#' @keywords internal +#' @export +YangZhangVolatility <- function(period, trading_periods) { + ptr <- .Call("wk_yang_zhang_volatility_new", period, trading_periods, PACKAGE = "wickra") + .wk_obj("yang_zhang_volatility", ptr, "YangZhangVolatility") +} + +#' YoyoExit indicator +#' @keywords internal +#' @export +YoyoExit <- function(atr_period, multiplier) { + ptr <- .Call("wk_yoyo_exit_new", atr_period, multiplier, PACKAGE = "wickra") + .wk_obj("yoyo_exit", ptr, "YoyoExit") +} + +#' ZScore indicator +#' @keywords internal +#' @export +ZScore <- function(period) { + ptr <- .Call("wk_z_score_new", period, PACKAGE = "wickra") + .wk_obj("z_score", ptr, "ZScore") +} + +#' ZeroLagMacd indicator +#' @keywords internal +#' @export +ZeroLagMacd <- function(fast, slow, signal) { + ptr <- .Call("wk_zero_lag_macd_new", fast, slow, signal, PACKAGE = "wickra") + .wk_obj("zero_lag_macd", ptr, "ZeroLagMacd") +} + +#' ZigZag indicator +#' @keywords internal +#' @export +ZigZag <- function(threshold) { + ptr <- .Call("wk_zig_zag_new", threshold, PACKAGE = "wickra") + .wk_obj("zig_zag", ptr, "ZigZag") +} + +#' Zlema indicator +#' @keywords internal +#' @export +Zlema <- function(period) { + ptr <- .Call("wk_zlema_new", period, PACKAGE = "wickra") + .wk_obj("zlema", ptr, "Zlema") +} + diff --git a/bindings/r/R/methods.R b/bindings/r/R/methods.R new file mode 100644 index 00000000..0af1d0ae --- /dev/null +++ b/bindings/r/R/methods.R @@ -0,0 +1,78 @@ +#' wickra: streaming-first technical indicators +#' +#' R bindings for the Wickra technical-analysis library over its C ABI hub. Each +#' indicator is a constructor (for example [Sma()], [Rsi()], [MacdIndicator()]) +#' returning a `wickra_indicator` object; feed it one observation at a time with +#' [update()], run a whole series in one call with [batch()], and clear its +#' state with [reset()]. The native handle is freed automatically when the object +#' is garbage-collected. +#' +#' @keywords internal +#' @importFrom stats update +"_PACKAGE" + +#' Update an indicator with one observation +#' +#' @param object A `wickra_indicator` created by an indicator constructor. +#' @param ... The observation: a single value for scalar indicators, the OHLCV +#' fields plus a timestamp for candle indicators, or two values for pairwise +#' indicators. +#' @return The indicator value: a numeric scalar; a named numeric vector for +#' multi-output indicators (`NA` during warmup); a matrix of completed bars for +#' bar builders; or a list / numeric vector for profile indicators +#' (`NULL` during warmup). +#' @examples +#' sma <- Sma(3) +#' for (x in c(1, 2, 3, 4, 5)) v <- update(sma, x) +#' v # 4 +#' @export +update.wickra_indicator <- function(object, ...) { + args <- list(object$ptr, ...) + if (!is.na(object$values_cap)) { + args <- c(args, object$values_cap) + } + do.call(".Call", c(list(paste0("wk_", object$prefix, "_update")), args, + list(PACKAGE = "wickra"))) +} + +#' Run an indicator over a whole series in one call +#' +#' Available for scalar indicators. The result is identical to feeding the same +#' inputs through [update()] one at a time, with `NA` at warmup positions. +#' +#' @param object A `wickra_indicator`. +#' @param ... The input vector(s). +#' @return A numeric vector the same length as the input. +#' @examples +#' batch(Sma(3), c(1, 2, 3, 4, 5)) # NA NA 2 3 4 +#' @export +batch <- function(object, ...) { + UseMethod("batch") +} + +#' @rdname batch +#' @export +batch.wickra_indicator <- function(object, ...) { + do.call(".Call", c(list(paste0("wk_", object$prefix, "_batch"), object$ptr), + list(...), list(PACKAGE = "wickra"))) +} + +#' Reset an indicator to its warmup state +#' +#' @param object A `wickra_indicator`. +#' @return The indicator, invisibly. +#' @examples +#' sma <- Sma(3) +#' update(sma, 1) +#' reset(sma) +#' @export +reset <- function(object) { + UseMethod("reset") +} + +#' @rdname reset +#' @export +reset.wickra_indicator <- function(object) { + .Call(paste0("wk_", object$prefix, "_reset"), object$ptr, PACKAGE = "wickra") + invisible(object) +} diff --git a/bindings/r/R/zzz.R b/bindings/r/R/zzz.R new file mode 100644 index 00000000..f352624d --- /dev/null +++ b/bindings/r/R/zzz.R @@ -0,0 +1,18 @@ +.onLoad <- function(libname, pkgname) { + # On Windows the package's wickra.dll depends on the bundled C ABI + # wickra_abi.dll; the loader searches PATH for it, so prepend the package's own + # libs directory. On Linux/macOS the rpath baked at build time locates the + # shared library, so no PATH change is needed. + if (.Platform$OS.type == "windows") { + libs <- system.file(paste0("libs", .Platform$r_arch), + package = pkgname, lib.loc = libname) + if (nzchar(libs)) { + Sys.setenv(PATH = paste(libs, Sys.getenv("PATH"), sep = .Platform$path.sep)) + } + } + library.dynam("wickra", pkgname, libname) +} + +.onUnload <- function(libpath) { + library.dynam.unload("wickra", libpath) +} diff --git a/bindings/r/README.md b/bindings/r/README.md new file mode 100644 index 00000000..d9bbd5a0 --- /dev/null +++ b/bindings/r/README.md @@ -0,0 +1,85 @@ +# Wickra — R + +[![CI](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml/badge.svg)](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/wickra-lib/wickra/branch/main/graph/badge.svg)](https://codecov.io/gh/wickra-lib/wickra) +[![License: MIT OR Apache-2.0](https://img.shields.io/badge/license-MIT_OR_Apache--2.0-blue)](https://github.com/wickra-lib/wickra#license) + +**Streaming-first technical indicators for R, over the Wickra C ABI hub via `.Call`.** + +Wickra is a multi-language technical-analysis library with a Rust core and +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R +and any other C-capable language. Every indicator is an O(1) streaming state +machine, so live trading and historical backtests share the exact same +implementation. This package is the R binding; it reaches the C ABI hub through +R's native `.Call` interface and exposes all 514 indicators as constructors that +return a lightweight `wickra_indicator` object. + +## Install + +The package compiles a thin C glue layer (`.Call`) against the prebuilt Wickra +C ABI library, so a C toolchain (Rtools on Windows) is required, plus the C ABI +header and library. Build the library from the workspace, then install the +package pointing at it: + +```bash +cargo build -p wickra-c --release +WICKRA_INCLUDE_DIR="$PWD/bindings/c/include" \ +WICKRA_LIB_DIR="$PWD/target/release" \ +R CMD INSTALL bindings/r +``` + +On Windows the C ABI DLL is bundled into the package and put on the load path +automatically; on Linux and macOS the library path is baked in via rpath. + +## Quick start + +```r +library(wickra) + +# Batch: run an indicator over a whole series (NaN at warmup positions). +prices <- 100 + (0:999) * 0.1 +sma <- Sma(20) +values <- batch(sma, prices) + +# Streaming: the same indicator, fed one observation at a time in O(1). +rsi <- Rsi(14) +for (price in prices) { + v <- update(rsi, price) # NaN during warmup + if (!is.na(v) && v > 70) message("overbought") +} + +# Multi-output indicators return a named vector (NA while warming up). +macd <- MacdIndicator(12, 26, 9) +update(macd, 42) # c(macd = NA, signal = NA, histogram = NA) +``` + +`batch(ind, prices)` and feeding the same prices through `update()` produce +identical values — the equivalence is enforced by the test suite. Candle-input +indicators take the OHLCV fields plus a timestamp, e.g. +`update(atr, open, high, low, close, volume, timestamp)`. The native handle is +freed automatically when the object is garbage-collected. + +## Documentation + +The full indicator catalogue, guides, quickstarts, and API reference live in the +main repository and documentation site: + +- **Repository & full indicator list:** +- **Docs** (quickstarts, cookbook, TA-Lib migration): +- **Runnable examples:** [`examples/r/`](https://github.com/wickra-lib/wickra/tree/main/examples/r) + +Wickra ships native bindings for Python, Node.js, WebAssembly and Rust, plus a +C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — +all exposing the same indicators from the shared, `unsafe`-forbidden Rust core. + +## Disclaimer + +Wickra is an indicator toolkit, not a trading system. The values it computes are +deterministic transforms of the input data — they are not financial advice and +do not predict the market. Any use in a live trading context is at your own risk. +The library is provided **as is**, without warranty of any kind. + +## License + +Licensed under either of [Apache-2.0](https://github.com/wickra-lib/wickra/blob/main/LICENSE-APACHE) +or [MIT](https://github.com/wickra-lib/wickra/blob/main/LICENSE-MIT) at your option. diff --git a/bindings/r/configure.win b/bindings/r/configure.win new file mode 100644 index 00000000..56ed1dae --- /dev/null +++ b/bindings/r/configure.win @@ -0,0 +1,17 @@ +#!/bin/sh +# Windows build: the package compiles to wickra.dll, which would collide with the +# C ABI's own wickra.dll (the loader would resolve the import to the package +# itself). Stage a renamed copy, wickra_abi.dll, into src/ and build a mingw +# import library that references it by that name (objdump + dlltool, both shipped +# with Rtools — no gendef/pexports needed). install.libs.R then bundles the DLL. +set -e +: "${WICKRA_LIB_DIR:?set WICKRA_LIB_DIR to the directory containing wickra.dll}" +cp "${WICKRA_LIB_DIR}/wickra.dll" src/wickra_abi.dll +{ + echo 'LIBRARY wickra_abi.dll' + echo 'EXPORTS' + objdump -p src/wickra_abi.dll | awk '/\[ *[0-9]+\]/ {print $NF}' | grep '^wickra_' +} > src/wickra_abi.def +dlltool --input-def src/wickra_abi.def --dllname wickra_abi.dll \ + --output-lib src/libwickra_abi.dll.a +exit 0 diff --git a/bindings/r/man/AbandonedBaby.Rd b/bindings/r/man/AbandonedBaby.Rd new file mode 100644 index 00000000..6522cdd0 --- /dev/null +++ b/bindings/r/man/AbandonedBaby.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AbandonedBaby} +\alias{AbandonedBaby} +\title{AbandonedBaby indicator} +\usage{ +AbandonedBaby() +} +\description{ +AbandonedBaby indicator +} +\keyword{internal} diff --git a/bindings/r/man/Abcd.Rd b/bindings/r/man/Abcd.Rd new file mode 100644 index 00000000..dfb9fe32 --- /dev/null +++ b/bindings/r/man/Abcd.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Abcd} +\alias{Abcd} +\title{Abcd indicator} +\usage{ +Abcd() +} +\description{ +Abcd indicator +} +\keyword{internal} diff --git a/bindings/r/man/AbsoluteBreadthIndex.Rd b/bindings/r/man/AbsoluteBreadthIndex.Rd new file mode 100644 index 00000000..8ff2f3fb --- /dev/null +++ b/bindings/r/man/AbsoluteBreadthIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AbsoluteBreadthIndex} +\alias{AbsoluteBreadthIndex} +\title{AbsoluteBreadthIndex indicator} +\usage{ +AbsoluteBreadthIndex() +} +\description{ +AbsoluteBreadthIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/AccelerationBands.Rd b/bindings/r/man/AccelerationBands.Rd new file mode 100644 index 00000000..66fd0c33 --- /dev/null +++ b/bindings/r/man/AccelerationBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AccelerationBands} +\alias{AccelerationBands} +\title{AccelerationBands indicator} +\usage{ +AccelerationBands(period, factor) +} +\description{ +AccelerationBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/AcceleratorOscillator.Rd b/bindings/r/man/AcceleratorOscillator.Rd new file mode 100644 index 00000000..d2464c3d --- /dev/null +++ b/bindings/r/man/AcceleratorOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AcceleratorOscillator} +\alias{AcceleratorOscillator} +\title{AcceleratorOscillator indicator} +\usage{ +AcceleratorOscillator(ao_fast, ao_slow, signal_period) +} +\description{ +AcceleratorOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdOscillator.Rd b/bindings/r/man/AdOscillator.Rd new file mode 100644 index 00000000..bde0250d --- /dev/null +++ b/bindings/r/man/AdOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdOscillator} +\alias{AdOscillator} +\title{AdOscillator indicator} +\usage{ +AdOscillator() +} +\description{ +AdOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdVolumeLine.Rd b/bindings/r/man/AdVolumeLine.Rd new file mode 100644 index 00000000..c5bb7f0e --- /dev/null +++ b/bindings/r/man/AdVolumeLine.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdVolumeLine} +\alias{AdVolumeLine} +\title{AdVolumeLine indicator} +\usage{ +AdVolumeLine() +} +\description{ +AdVolumeLine indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdaptiveCci.Rd b/bindings/r/man/AdaptiveCci.Rd new file mode 100644 index 00000000..ec2fcabe --- /dev/null +++ b/bindings/r/man/AdaptiveCci.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdaptiveCci} +\alias{AdaptiveCci} +\title{AdaptiveCci indicator} +\usage{ +AdaptiveCci(period) +} +\description{ +AdaptiveCci indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdaptiveCycle.Rd b/bindings/r/man/AdaptiveCycle.Rd new file mode 100644 index 00000000..b300b739 --- /dev/null +++ b/bindings/r/man/AdaptiveCycle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdaptiveCycle} +\alias{AdaptiveCycle} +\title{AdaptiveCycle indicator} +\usage{ +AdaptiveCycle() +} +\description{ +AdaptiveCycle indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdaptiveLaguerreFilter.Rd b/bindings/r/man/AdaptiveLaguerreFilter.Rd new file mode 100644 index 00000000..0d4dfe93 --- /dev/null +++ b/bindings/r/man/AdaptiveLaguerreFilter.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdaptiveLaguerreFilter} +\alias{AdaptiveLaguerreFilter} +\title{AdaptiveLaguerreFilter indicator} +\usage{ +AdaptiveLaguerreFilter(period) +} +\description{ +AdaptiveLaguerreFilter indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdaptiveRsi.Rd b/bindings/r/man/AdaptiveRsi.Rd new file mode 100644 index 00000000..47f5db03 --- /dev/null +++ b/bindings/r/man/AdaptiveRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdaptiveRsi} +\alias{AdaptiveRsi} +\title{AdaptiveRsi indicator} +\usage{ +AdaptiveRsi(period) +} +\description{ +AdaptiveRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Adl.Rd b/bindings/r/man/Adl.Rd new file mode 100644 index 00000000..f9a2308e --- /dev/null +++ b/bindings/r/man/Adl.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Adl} +\alias{Adl} +\title{Adl indicator} +\usage{ +Adl() +} +\description{ +Adl indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdvanceBlock.Rd b/bindings/r/man/AdvanceBlock.Rd new file mode 100644 index 00000000..698d4c5c --- /dev/null +++ b/bindings/r/man/AdvanceBlock.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdvanceBlock} +\alias{AdvanceBlock} +\title{AdvanceBlock indicator} +\usage{ +AdvanceBlock() +} +\description{ +AdvanceBlock indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdvanceDecline.Rd b/bindings/r/man/AdvanceDecline.Rd new file mode 100644 index 00000000..13829a3e --- /dev/null +++ b/bindings/r/man/AdvanceDecline.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdvanceDecline} +\alias{AdvanceDecline} +\title{AdvanceDecline indicator} +\usage{ +AdvanceDecline() +} +\description{ +AdvanceDecline indicator +} +\keyword{internal} diff --git a/bindings/r/man/AdvanceDeclineRatio.Rd b/bindings/r/man/AdvanceDeclineRatio.Rd new file mode 100644 index 00000000..57b6627f --- /dev/null +++ b/bindings/r/man/AdvanceDeclineRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AdvanceDeclineRatio} +\alias{AdvanceDeclineRatio} +\title{AdvanceDeclineRatio indicator} +\usage{ +AdvanceDeclineRatio() +} +\description{ +AdvanceDeclineRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Adx.Rd b/bindings/r/man/Adx.Rd new file mode 100644 index 00000000..73b3bff0 --- /dev/null +++ b/bindings/r/man/Adx.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Adx} +\alias{Adx} +\title{Adx indicator} +\usage{ +Adx(period) +} +\description{ +Adx indicator +} +\keyword{internal} diff --git a/bindings/r/man/Adxr.Rd b/bindings/r/man/Adxr.Rd new file mode 100644 index 00000000..9b3c3c6d --- /dev/null +++ b/bindings/r/man/Adxr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Adxr} +\alias{Adxr} +\title{Adxr indicator} +\usage{ +Adxr(period) +} +\description{ +Adxr indicator +} +\keyword{internal} diff --git a/bindings/r/man/Alligator.Rd b/bindings/r/man/Alligator.Rd new file mode 100644 index 00000000..8cd923b4 --- /dev/null +++ b/bindings/r/man/Alligator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Alligator} +\alias{Alligator} +\title{Alligator indicator} +\usage{ +Alligator(jaw_period, teeth_period, lips_period) +} +\description{ +Alligator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Alma.Rd b/bindings/r/man/Alma.Rd new file mode 100644 index 00000000..cdad6474 --- /dev/null +++ b/bindings/r/man/Alma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Alma} +\alias{Alma} +\title{Alma indicator} +\usage{ +Alma(period, offset, sigma) +} +\description{ +Alma indicator +} +\keyword{internal} diff --git a/bindings/r/man/Alpha.Rd b/bindings/r/man/Alpha.Rd new file mode 100644 index 00000000..0cdf224f --- /dev/null +++ b/bindings/r/man/Alpha.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Alpha} +\alias{Alpha} +\title{Alpha indicator} +\usage{ +Alpha(period, risk_free) +} +\description{ +Alpha indicator +} +\keyword{internal} diff --git a/bindings/r/man/AmihudIlliquidity.Rd b/bindings/r/man/AmihudIlliquidity.Rd new file mode 100644 index 00000000..e4b77a07 --- /dev/null +++ b/bindings/r/man/AmihudIlliquidity.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AmihudIlliquidity} +\alias{AmihudIlliquidity} +\title{AmihudIlliquidity indicator} +\usage{ +AmihudIlliquidity(period) +} +\description{ +AmihudIlliquidity indicator +} +\keyword{internal} diff --git a/bindings/r/man/AnchoredRsi.Rd b/bindings/r/man/AnchoredRsi.Rd new file mode 100644 index 00000000..457bcb73 --- /dev/null +++ b/bindings/r/man/AnchoredRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AnchoredRsi} +\alias{AnchoredRsi} +\title{AnchoredRsi indicator} +\usage{ +AnchoredRsi() +} +\description{ +AnchoredRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/AnchoredVwap.Rd b/bindings/r/man/AnchoredVwap.Rd new file mode 100644 index 00000000..fca2c02e --- /dev/null +++ b/bindings/r/man/AnchoredVwap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AnchoredVwap} +\alias{AnchoredVwap} +\title{AnchoredVwap indicator} +\usage{ +AnchoredVwap() +} +\description{ +AnchoredVwap indicator +} +\keyword{internal} diff --git a/bindings/r/man/AndrewsPitchfork.Rd b/bindings/r/man/AndrewsPitchfork.Rd new file mode 100644 index 00000000..efd6bf7e --- /dev/null +++ b/bindings/r/man/AndrewsPitchfork.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AndrewsPitchfork} +\alias{AndrewsPitchfork} +\title{AndrewsPitchfork indicator} +\usage{ +AndrewsPitchfork(strength) +} +\description{ +AndrewsPitchfork indicator +} +\keyword{internal} diff --git a/bindings/r/man/Apo.Rd b/bindings/r/man/Apo.Rd new file mode 100644 index 00000000..51aab5ce --- /dev/null +++ b/bindings/r/man/Apo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Apo} +\alias{Apo} +\title{Apo indicator} +\usage{ +Apo(fast, slow) +} +\description{ +Apo indicator +} +\keyword{internal} diff --git a/bindings/r/man/Aroon.Rd b/bindings/r/man/Aroon.Rd new file mode 100644 index 00000000..c9ed834e --- /dev/null +++ b/bindings/r/man/Aroon.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Aroon} +\alias{Aroon} +\title{Aroon indicator} +\usage{ +Aroon(period) +} +\description{ +Aroon indicator +} +\keyword{internal} diff --git a/bindings/r/man/AroonOscillator.Rd b/bindings/r/man/AroonOscillator.Rd new file mode 100644 index 00000000..996ac3be --- /dev/null +++ b/bindings/r/man/AroonOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AroonOscillator} +\alias{AroonOscillator} +\title{AroonOscillator indicator} +\usage{ +AroonOscillator(period) +} +\description{ +AroonOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Atr.Rd b/bindings/r/man/Atr.Rd new file mode 100644 index 00000000..043cea35 --- /dev/null +++ b/bindings/r/man/Atr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Atr} +\alias{Atr} +\title{Atr indicator} +\usage{ +Atr(period) +} +\description{ +Atr indicator +} +\keyword{internal} diff --git a/bindings/r/man/AtrBands.Rd b/bindings/r/man/AtrBands.Rd new file mode 100644 index 00000000..78d37b88 --- /dev/null +++ b/bindings/r/man/AtrBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AtrBands} +\alias{AtrBands} +\title{AtrBands indicator} +\usage{ +AtrBands(period, multiplier) +} +\description{ +AtrBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/AtrRatchet.Rd b/bindings/r/man/AtrRatchet.Rd new file mode 100644 index 00000000..daf1efff --- /dev/null +++ b/bindings/r/man/AtrRatchet.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AtrRatchet} +\alias{AtrRatchet} +\title{AtrRatchet indicator} +\usage{ +AtrRatchet(atr_period, start_mult, increment) +} +\description{ +AtrRatchet indicator +} +\keyword{internal} diff --git a/bindings/r/man/AtrTrailingStop.Rd b/bindings/r/man/AtrTrailingStop.Rd new file mode 100644 index 00000000..d350b7e6 --- /dev/null +++ b/bindings/r/man/AtrTrailingStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AtrTrailingStop} +\alias{AtrTrailingStop} +\title{AtrTrailingStop indicator} +\usage{ +AtrTrailingStop(atr_period, multiplier) +} +\description{ +AtrTrailingStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/AutoFib.Rd b/bindings/r/man/AutoFib.Rd new file mode 100644 index 00000000..3323941b --- /dev/null +++ b/bindings/r/man/AutoFib.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AutoFib} +\alias{AutoFib} +\title{AutoFib indicator} +\usage{ +AutoFib() +} +\description{ +AutoFib indicator +} +\keyword{internal} diff --git a/bindings/r/man/Autocorrelation.Rd b/bindings/r/man/Autocorrelation.Rd new file mode 100644 index 00000000..c6cb9e66 --- /dev/null +++ b/bindings/r/man/Autocorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Autocorrelation} +\alias{Autocorrelation} +\title{Autocorrelation indicator} +\usage{ +Autocorrelation(period, lag) +} +\description{ +Autocorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/AutocorrelationPeriodogram.Rd b/bindings/r/man/AutocorrelationPeriodogram.Rd new file mode 100644 index 00000000..2b9c37d4 --- /dev/null +++ b/bindings/r/man/AutocorrelationPeriodogram.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AutocorrelationPeriodogram} +\alias{AutocorrelationPeriodogram} +\title{AutocorrelationPeriodogram indicator} +\usage{ +AutocorrelationPeriodogram(min_period, max_period) +} +\description{ +AutocorrelationPeriodogram indicator +} +\keyword{internal} diff --git a/bindings/r/man/AverageDailyRange.Rd b/bindings/r/man/AverageDailyRange.Rd new file mode 100644 index 00000000..263a0ffe --- /dev/null +++ b/bindings/r/man/AverageDailyRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AverageDailyRange} +\alias{AverageDailyRange} +\title{AverageDailyRange indicator} +\usage{ +AverageDailyRange(period, utc_offset_minutes) +} +\description{ +AverageDailyRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/AverageDrawdown.Rd b/bindings/r/man/AverageDrawdown.Rd new file mode 100644 index 00000000..b2bc2d79 --- /dev/null +++ b/bindings/r/man/AverageDrawdown.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AverageDrawdown} +\alias{AverageDrawdown} +\title{AverageDrawdown indicator} +\usage{ +AverageDrawdown(period) +} +\description{ +AverageDrawdown indicator +} +\keyword{internal} diff --git a/bindings/r/man/AvgPrice.Rd b/bindings/r/man/AvgPrice.Rd new file mode 100644 index 00000000..589ecb4c --- /dev/null +++ b/bindings/r/man/AvgPrice.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AvgPrice} +\alias{AvgPrice} +\title{AvgPrice indicator} +\usage{ +AvgPrice() +} +\description{ +AvgPrice indicator +} +\keyword{internal} diff --git a/bindings/r/man/AwesomeOscillator.Rd b/bindings/r/man/AwesomeOscillator.Rd new file mode 100644 index 00000000..b38fcbdc --- /dev/null +++ b/bindings/r/man/AwesomeOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AwesomeOscillator} +\alias{AwesomeOscillator} +\title{AwesomeOscillator indicator} +\usage{ +AwesomeOscillator(fast, slow) +} +\description{ +AwesomeOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/AwesomeOscillatorHistogram.Rd b/bindings/r/man/AwesomeOscillatorHistogram.Rd new file mode 100644 index 00000000..92155d91 --- /dev/null +++ b/bindings/r/man/AwesomeOscillatorHistogram.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{AwesomeOscillatorHistogram} +\alias{AwesomeOscillatorHistogram} +\title{AwesomeOscillatorHistogram indicator} +\usage{ +AwesomeOscillatorHistogram(fast, slow, sma_period) +} +\description{ +AwesomeOscillatorHistogram indicator +} +\keyword{internal} diff --git a/bindings/r/man/BalanceOfPower.Rd b/bindings/r/man/BalanceOfPower.Rd new file mode 100644 index 00000000..80408ea9 --- /dev/null +++ b/bindings/r/man/BalanceOfPower.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BalanceOfPower} +\alias{BalanceOfPower} +\title{BalanceOfPower indicator} +\usage{ +BalanceOfPower() +} +\description{ +BalanceOfPower indicator +} +\keyword{internal} diff --git a/bindings/r/man/BandpassFilter.Rd b/bindings/r/man/BandpassFilter.Rd new file mode 100644 index 00000000..1f6f9383 --- /dev/null +++ b/bindings/r/man/BandpassFilter.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BandpassFilter} +\alias{BandpassFilter} +\title{BandpassFilter indicator} +\usage{ +BandpassFilter(period, bandwidth) +} +\description{ +BandpassFilter indicator +} +\keyword{internal} diff --git a/bindings/r/man/Bat.Rd b/bindings/r/man/Bat.Rd new file mode 100644 index 00000000..35fdb5d1 --- /dev/null +++ b/bindings/r/man/Bat.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Bat} +\alias{Bat} +\title{Bat indicator} +\usage{ +Bat() +} +\description{ +Bat indicator +} +\keyword{internal} diff --git a/bindings/r/man/BeltHold.Rd b/bindings/r/man/BeltHold.Rd new file mode 100644 index 00000000..411b9865 --- /dev/null +++ b/bindings/r/man/BeltHold.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BeltHold} +\alias{BeltHold} +\title{BeltHold indicator} +\usage{ +BeltHold() +} +\description{ +BeltHold indicator +} +\keyword{internal} diff --git a/bindings/r/man/Beta.Rd b/bindings/r/man/Beta.Rd new file mode 100644 index 00000000..7ac24cc9 --- /dev/null +++ b/bindings/r/man/Beta.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Beta} +\alias{Beta} +\title{Beta indicator} +\usage{ +Beta(period) +} +\description{ +Beta indicator +} +\keyword{internal} diff --git a/bindings/r/man/BetaNeutralSpread.Rd b/bindings/r/man/BetaNeutralSpread.Rd new file mode 100644 index 00000000..33796f1f --- /dev/null +++ b/bindings/r/man/BetaNeutralSpread.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BetaNeutralSpread} +\alias{BetaNeutralSpread} +\title{BetaNeutralSpread indicator} +\usage{ +BetaNeutralSpread(period) +} +\description{ +BetaNeutralSpread indicator +} +\keyword{internal} diff --git a/bindings/r/man/BetterVolume.Rd b/bindings/r/man/BetterVolume.Rd new file mode 100644 index 00000000..54eed570 --- /dev/null +++ b/bindings/r/man/BetterVolume.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BetterVolume} +\alias{BetterVolume} +\title{BetterVolume indicator} +\usage{ +BetterVolume(period) +} +\description{ +BetterVolume indicator +} +\keyword{internal} diff --git a/bindings/r/man/BipowerVariation.Rd b/bindings/r/man/BipowerVariation.Rd new file mode 100644 index 00000000..03918b8d --- /dev/null +++ b/bindings/r/man/BipowerVariation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BipowerVariation} +\alias{BipowerVariation} +\title{BipowerVariation indicator} +\usage{ +BipowerVariation(period) +} +\description{ +BipowerVariation indicator +} +\keyword{internal} diff --git a/bindings/r/man/BodySizePct.Rd b/bindings/r/man/BodySizePct.Rd new file mode 100644 index 00000000..3f546c1a --- /dev/null +++ b/bindings/r/man/BodySizePct.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BodySizePct} +\alias{BodySizePct} +\title{BodySizePct indicator} +\usage{ +BodySizePct() +} +\description{ +BodySizePct indicator +} +\keyword{internal} diff --git a/bindings/r/man/BollingerBands.Rd b/bindings/r/man/BollingerBands.Rd new file mode 100644 index 00000000..5cc31091 --- /dev/null +++ b/bindings/r/man/BollingerBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BollingerBands} +\alias{BollingerBands} +\title{BollingerBands indicator} +\usage{ +BollingerBands(period, multiplier) +} +\description{ +BollingerBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/BollingerBandwidth.Rd b/bindings/r/man/BollingerBandwidth.Rd new file mode 100644 index 00000000..bda10230 --- /dev/null +++ b/bindings/r/man/BollingerBandwidth.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BollingerBandwidth} +\alias{BollingerBandwidth} +\title{BollingerBandwidth indicator} +\usage{ +BollingerBandwidth(period, multiplier) +} +\description{ +BollingerBandwidth indicator +} +\keyword{internal} diff --git a/bindings/r/man/BomarBands.Rd b/bindings/r/man/BomarBands.Rd new file mode 100644 index 00000000..ff0f951f --- /dev/null +++ b/bindings/r/man/BomarBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BomarBands} +\alias{BomarBands} +\title{BomarBands indicator} +\usage{ +BomarBands(period, coverage) +} +\description{ +BomarBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/BreadthThrust.Rd b/bindings/r/man/BreadthThrust.Rd new file mode 100644 index 00000000..98ccce4c --- /dev/null +++ b/bindings/r/man/BreadthThrust.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BreadthThrust} +\alias{BreadthThrust} +\title{BreadthThrust indicator} +\usage{ +BreadthThrust(period) +} +\description{ +BreadthThrust indicator +} +\keyword{internal} diff --git a/bindings/r/man/Breakaway.Rd b/bindings/r/man/Breakaway.Rd new file mode 100644 index 00000000..634d6ae0 --- /dev/null +++ b/bindings/r/man/Breakaway.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Breakaway} +\alias{Breakaway} +\title{Breakaway indicator} +\usage{ +Breakaway() +} +\description{ +Breakaway indicator +} +\keyword{internal} diff --git a/bindings/r/man/BullishPercentIndex.Rd b/bindings/r/man/BullishPercentIndex.Rd new file mode 100644 index 00000000..8224f5cb --- /dev/null +++ b/bindings/r/man/BullishPercentIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BullishPercentIndex} +\alias{BullishPercentIndex} +\title{BullishPercentIndex indicator} +\usage{ +BullishPercentIndex() +} +\description{ +BullishPercentIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/BurkeRatio.Rd b/bindings/r/man/BurkeRatio.Rd new file mode 100644 index 00000000..c8c97603 --- /dev/null +++ b/bindings/r/man/BurkeRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{BurkeRatio} +\alias{BurkeRatio} +\title{BurkeRatio indicator} +\usage{ +BurkeRatio(period) +} +\description{ +BurkeRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Butterfly.Rd b/bindings/r/man/Butterfly.Rd new file mode 100644 index 00000000..8ac0b7db --- /dev/null +++ b/bindings/r/man/Butterfly.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Butterfly} +\alias{Butterfly} +\title{Butterfly indicator} +\usage{ +Butterfly() +} +\description{ +Butterfly indicator +} +\keyword{internal} diff --git a/bindings/r/man/CalendarSpread.Rd b/bindings/r/man/CalendarSpread.Rd new file mode 100644 index 00000000..52ead419 --- /dev/null +++ b/bindings/r/man/CalendarSpread.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CalendarSpread} +\alias{CalendarSpread} +\title{CalendarSpread indicator} +\usage{ +CalendarSpread() +} +\description{ +CalendarSpread indicator +} +\keyword{internal} diff --git a/bindings/r/man/CalmarRatio.Rd b/bindings/r/man/CalmarRatio.Rd new file mode 100644 index 00000000..7cfe6ce7 --- /dev/null +++ b/bindings/r/man/CalmarRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CalmarRatio} +\alias{CalmarRatio} +\title{CalmarRatio indicator} +\usage{ +CalmarRatio(period) +} +\description{ +CalmarRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Camarilla.Rd b/bindings/r/man/Camarilla.Rd new file mode 100644 index 00000000..f4c210c7 --- /dev/null +++ b/bindings/r/man/Camarilla.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Camarilla} +\alias{Camarilla} +\title{Camarilla indicator} +\usage{ +Camarilla() +} +\description{ +Camarilla indicator +} +\keyword{internal} diff --git a/bindings/r/man/CandleVolume.Rd b/bindings/r/man/CandleVolume.Rd new file mode 100644 index 00000000..45a8301d --- /dev/null +++ b/bindings/r/man/CandleVolume.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CandleVolume} +\alias{CandleVolume} +\title{CandleVolume indicator} +\usage{ +CandleVolume(period) +} +\description{ +CandleVolume indicator +} +\keyword{internal} diff --git a/bindings/r/man/Cci.Rd b/bindings/r/man/Cci.Rd new file mode 100644 index 00000000..f090a81a --- /dev/null +++ b/bindings/r/man/Cci.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Cci} +\alias{Cci} +\title{Cci indicator} +\usage{ +Cci(period) +} +\description{ +Cci indicator +} +\keyword{internal} diff --git a/bindings/r/man/CenterOfGravity.Rd b/bindings/r/man/CenterOfGravity.Rd new file mode 100644 index 00000000..d0b07c2e --- /dev/null +++ b/bindings/r/man/CenterOfGravity.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CenterOfGravity} +\alias{CenterOfGravity} +\title{CenterOfGravity indicator} +\usage{ +CenterOfGravity(period) +} +\description{ +CenterOfGravity indicator +} +\keyword{internal} diff --git a/bindings/r/man/CentralPivotRange.Rd b/bindings/r/man/CentralPivotRange.Rd new file mode 100644 index 00000000..accda545 --- /dev/null +++ b/bindings/r/man/CentralPivotRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CentralPivotRange} +\alias{CentralPivotRange} +\title{CentralPivotRange indicator} +\usage{ +CentralPivotRange() +} +\description{ +CentralPivotRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/Cfo.Rd b/bindings/r/man/Cfo.Rd new file mode 100644 index 00000000..751060f6 --- /dev/null +++ b/bindings/r/man/Cfo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Cfo} +\alias{Cfo} +\title{Cfo indicator} +\usage{ +Cfo(period) +} +\description{ +Cfo indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChaikinMoneyFlow.Rd b/bindings/r/man/ChaikinMoneyFlow.Rd new file mode 100644 index 00000000..444dbec4 --- /dev/null +++ b/bindings/r/man/ChaikinMoneyFlow.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChaikinMoneyFlow} +\alias{ChaikinMoneyFlow} +\title{ChaikinMoneyFlow indicator} +\usage{ +ChaikinMoneyFlow(period) +} +\description{ +ChaikinMoneyFlow indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChaikinOscillator.Rd b/bindings/r/man/ChaikinOscillator.Rd new file mode 100644 index 00000000..fa84196d --- /dev/null +++ b/bindings/r/man/ChaikinOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChaikinOscillator} +\alias{ChaikinOscillator} +\title{ChaikinOscillator indicator} +\usage{ +ChaikinOscillator(fast, slow) +} +\description{ +ChaikinOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChaikinVolatility.Rd b/bindings/r/man/ChaikinVolatility.Rd new file mode 100644 index 00000000..9576c1ef --- /dev/null +++ b/bindings/r/man/ChaikinVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChaikinVolatility} +\alias{ChaikinVolatility} +\title{ChaikinVolatility indicator} +\usage{ +ChaikinVolatility(ema_period, roc_period) +} +\description{ +ChaikinVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChandeKrollStop.Rd b/bindings/r/man/ChandeKrollStop.Rd new file mode 100644 index 00000000..716f9ced --- /dev/null +++ b/bindings/r/man/ChandeKrollStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChandeKrollStop} +\alias{ChandeKrollStop} +\title{ChandeKrollStop indicator} +\usage{ +ChandeKrollStop(atr_period, atr_multiplier, stop_period) +} +\description{ +ChandeKrollStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChandelierExit.Rd b/bindings/r/man/ChandelierExit.Rd new file mode 100644 index 00000000..098722c1 --- /dev/null +++ b/bindings/r/man/ChandelierExit.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChandelierExit} +\alias{ChandelierExit} +\title{ChandelierExit indicator} +\usage{ +ChandelierExit(period, multiplier) +} +\description{ +ChandelierExit indicator +} +\keyword{internal} diff --git a/bindings/r/man/ChoppinessIndex.Rd b/bindings/r/man/ChoppinessIndex.Rd new file mode 100644 index 00000000..6d15c9a2 --- /dev/null +++ b/bindings/r/man/ChoppinessIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ChoppinessIndex} +\alias{ChoppinessIndex} +\title{ChoppinessIndex indicator} +\usage{ +ChoppinessIndex(period) +} +\description{ +ChoppinessIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/ClassicPivots.Rd b/bindings/r/man/ClassicPivots.Rd new file mode 100644 index 00000000..c3d7c3cd --- /dev/null +++ b/bindings/r/man/ClassicPivots.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ClassicPivots} +\alias{ClassicPivots} +\title{ClassicPivots indicator} +\usage{ +ClassicPivots() +} +\description{ +ClassicPivots indicator +} +\keyword{internal} diff --git a/bindings/r/man/CloseVsOpen.Rd b/bindings/r/man/CloseVsOpen.Rd new file mode 100644 index 00000000..45862f6d --- /dev/null +++ b/bindings/r/man/CloseVsOpen.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CloseVsOpen} +\alias{CloseVsOpen} +\title{CloseVsOpen indicator} +\usage{ +CloseVsOpen() +} +\description{ +CloseVsOpen indicator +} +\keyword{internal} diff --git a/bindings/r/man/ClosingMarubozu.Rd b/bindings/r/man/ClosingMarubozu.Rd new file mode 100644 index 00000000..ea4f138b --- /dev/null +++ b/bindings/r/man/ClosingMarubozu.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ClosingMarubozu} +\alias{ClosingMarubozu} +\title{ClosingMarubozu indicator} +\usage{ +ClosingMarubozu() +} +\description{ +ClosingMarubozu indicator +} +\keyword{internal} diff --git a/bindings/r/man/Cmo.Rd b/bindings/r/man/Cmo.Rd new file mode 100644 index 00000000..529df6c6 --- /dev/null +++ b/bindings/r/man/Cmo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Cmo} +\alias{Cmo} +\title{Cmo indicator} +\usage{ +Cmo(period) +} +\description{ +Cmo indicator +} +\keyword{internal} diff --git a/bindings/r/man/CoefficientOfVariation.Rd b/bindings/r/man/CoefficientOfVariation.Rd new file mode 100644 index 00000000..f141b3da --- /dev/null +++ b/bindings/r/man/CoefficientOfVariation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CoefficientOfVariation} +\alias{CoefficientOfVariation} +\title{CoefficientOfVariation indicator} +\usage{ +CoefficientOfVariation(period) +} +\description{ +CoefficientOfVariation indicator +} +\keyword{internal} diff --git a/bindings/r/man/Cointegration.Rd b/bindings/r/man/Cointegration.Rd new file mode 100644 index 00000000..55929d1c --- /dev/null +++ b/bindings/r/man/Cointegration.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Cointegration} +\alias{Cointegration} +\title{Cointegration indicator} +\usage{ +Cointegration(period, adf_lags) +} +\description{ +Cointegration indicator +} +\keyword{internal} diff --git a/bindings/r/man/CommonSenseRatio.Rd b/bindings/r/man/CommonSenseRatio.Rd new file mode 100644 index 00000000..7f241d8b --- /dev/null +++ b/bindings/r/man/CommonSenseRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CommonSenseRatio} +\alias{CommonSenseRatio} +\title{CommonSenseRatio indicator} +\usage{ +CommonSenseRatio(period) +} +\description{ +CommonSenseRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/CompositeProfile.Rd b/bindings/r/man/CompositeProfile.Rd new file mode 100644 index 00000000..e7e418f0 --- /dev/null +++ b/bindings/r/man/CompositeProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CompositeProfile} +\alias{CompositeProfile} +\title{CompositeProfile indicator} +\usage{ +CompositeProfile(period, bins, value_area_pct) +} +\description{ +CompositeProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/ConcealingBabySwallow.Rd b/bindings/r/man/ConcealingBabySwallow.Rd new file mode 100644 index 00000000..2a407e94 --- /dev/null +++ b/bindings/r/man/ConcealingBabySwallow.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ConcealingBabySwallow} +\alias{ConcealingBabySwallow} +\title{ConcealingBabySwallow indicator} +\usage{ +ConcealingBabySwallow() +} +\description{ +ConcealingBabySwallow indicator +} +\keyword{internal} diff --git a/bindings/r/man/ConditionalValueAtRisk.Rd b/bindings/r/man/ConditionalValueAtRisk.Rd new file mode 100644 index 00000000..df3bfa73 --- /dev/null +++ b/bindings/r/man/ConditionalValueAtRisk.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ConditionalValueAtRisk} +\alias{ConditionalValueAtRisk} +\title{ConditionalValueAtRisk indicator} +\usage{ +ConditionalValueAtRisk(period, confidence) +} +\description{ +ConditionalValueAtRisk indicator +} +\keyword{internal} diff --git a/bindings/r/man/ConnorsRsi.Rd b/bindings/r/man/ConnorsRsi.Rd new file mode 100644 index 00000000..b8151db6 --- /dev/null +++ b/bindings/r/man/ConnorsRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ConnorsRsi} +\alias{ConnorsRsi} +\title{ConnorsRsi indicator} +\usage{ +ConnorsRsi(period_rsi, period_streak, period_rank) +} +\description{ +ConnorsRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Coppock.Rd b/bindings/r/man/Coppock.Rd new file mode 100644 index 00000000..af30084a --- /dev/null +++ b/bindings/r/man/Coppock.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Coppock} +\alias{Coppock} +\title{Coppock indicator} +\usage{ +Coppock(roc_long_period, roc_short_period, wma_period) +} +\description{ +Coppock indicator +} +\keyword{internal} diff --git a/bindings/r/man/CorrelationTrendIndicator.Rd b/bindings/r/man/CorrelationTrendIndicator.Rd new file mode 100644 index 00000000..2ba0e69a --- /dev/null +++ b/bindings/r/man/CorrelationTrendIndicator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CorrelationTrendIndicator} +\alias{CorrelationTrendIndicator} +\title{CorrelationTrendIndicator indicator} +\usage{ +CorrelationTrendIndicator(period) +} +\description{ +CorrelationTrendIndicator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Counterattack.Rd b/bindings/r/man/Counterattack.Rd new file mode 100644 index 00000000..b99ed6cc --- /dev/null +++ b/bindings/r/man/Counterattack.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Counterattack} +\alias{Counterattack} +\title{Counterattack indicator} +\usage{ +Counterattack() +} +\description{ +Counterattack indicator +} +\keyword{internal} diff --git a/bindings/r/man/Crab.Rd b/bindings/r/man/Crab.Rd new file mode 100644 index 00000000..b52e7143 --- /dev/null +++ b/bindings/r/man/Crab.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Crab} +\alias{Crab} +\title{Crab indicator} +\usage{ +Crab() +} +\description{ +Crab indicator +} +\keyword{internal} diff --git a/bindings/r/man/CumulativeVolumeDelta.Rd b/bindings/r/man/CumulativeVolumeDelta.Rd new file mode 100644 index 00000000..4fa7f0a9 --- /dev/null +++ b/bindings/r/man/CumulativeVolumeDelta.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CumulativeVolumeDelta} +\alias{CumulativeVolumeDelta} +\title{CumulativeVolumeDelta indicator} +\usage{ +CumulativeVolumeDelta() +} +\description{ +CumulativeVolumeDelta indicator +} +\keyword{internal} diff --git a/bindings/r/man/CumulativeVolumeIndex.Rd b/bindings/r/man/CumulativeVolumeIndex.Rd new file mode 100644 index 00000000..a1072af7 --- /dev/null +++ b/bindings/r/man/CumulativeVolumeIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CumulativeVolumeIndex} +\alias{CumulativeVolumeIndex} +\title{CumulativeVolumeIndex indicator} +\usage{ +CumulativeVolumeIndex() +} +\description{ +CumulativeVolumeIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/CupAndHandle.Rd b/bindings/r/man/CupAndHandle.Rd new file mode 100644 index 00000000..336a6dee --- /dev/null +++ b/bindings/r/man/CupAndHandle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CupAndHandle} +\alias{CupAndHandle} +\title{CupAndHandle indicator} +\usage{ +CupAndHandle() +} +\description{ +CupAndHandle indicator +} +\keyword{internal} diff --git a/bindings/r/man/CyberneticCycle.Rd b/bindings/r/man/CyberneticCycle.Rd new file mode 100644 index 00000000..912158a9 --- /dev/null +++ b/bindings/r/man/CyberneticCycle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{CyberneticCycle} +\alias{CyberneticCycle} +\title{CyberneticCycle indicator} +\usage{ +CyberneticCycle(period) +} +\description{ +CyberneticCycle indicator +} +\keyword{internal} diff --git a/bindings/r/man/Cypher.Rd b/bindings/r/man/Cypher.Rd new file mode 100644 index 00000000..aab61579 --- /dev/null +++ b/bindings/r/man/Cypher.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Cypher} +\alias{Cypher} +\title{Cypher indicator} +\usage{ +Cypher() +} +\description{ +Cypher indicator +} +\keyword{internal} diff --git a/bindings/r/man/DayOfWeekProfile.Rd b/bindings/r/man/DayOfWeekProfile.Rd new file mode 100644 index 00000000..5e52f1e2 --- /dev/null +++ b/bindings/r/man/DayOfWeekProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DayOfWeekProfile} +\alias{DayOfWeekProfile} +\title{DayOfWeekProfile indicator} +\usage{ +DayOfWeekProfile(utc_offset_minutes) +} +\description{ +DayOfWeekProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/Decycler.Rd b/bindings/r/man/Decycler.Rd new file mode 100644 index 00000000..a5514ec5 --- /dev/null +++ b/bindings/r/man/Decycler.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Decycler} +\alias{Decycler} +\title{Decycler indicator} +\usage{ +Decycler(period) +} +\description{ +Decycler indicator +} +\keyword{internal} diff --git a/bindings/r/man/DecyclerOscillator.Rd b/bindings/r/man/DecyclerOscillator.Rd new file mode 100644 index 00000000..2352adb9 --- /dev/null +++ b/bindings/r/man/DecyclerOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DecyclerOscillator} +\alias{DecyclerOscillator} +\title{DecyclerOscillator indicator} +\usage{ +DecyclerOscillator(fast, slow) +} +\description{ +DecyclerOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Dema.Rd b/bindings/r/man/Dema.Rd new file mode 100644 index 00000000..109a03cc --- /dev/null +++ b/bindings/r/man/Dema.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Dema} +\alias{Dema} +\title{Dema indicator} +\usage{ +Dema(period) +} +\description{ +Dema indicator +} +\keyword{internal} diff --git a/bindings/r/man/DemandIndex.Rd b/bindings/r/man/DemandIndex.Rd new file mode 100644 index 00000000..d2821bf4 --- /dev/null +++ b/bindings/r/man/DemandIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DemandIndex} +\alias{DemandIndex} +\title{DemandIndex indicator} +\usage{ +DemandIndex(period) +} +\description{ +DemandIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/DemarkPivots.Rd b/bindings/r/man/DemarkPivots.Rd new file mode 100644 index 00000000..22f07350 --- /dev/null +++ b/bindings/r/man/DemarkPivots.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DemarkPivots} +\alias{DemarkPivots} +\title{DemarkPivots indicator} +\usage{ +DemarkPivots() +} +\description{ +DemarkPivots indicator +} +\keyword{internal} diff --git a/bindings/r/man/DepthSlope.Rd b/bindings/r/man/DepthSlope.Rd new file mode 100644 index 00000000..890c5c6a --- /dev/null +++ b/bindings/r/man/DepthSlope.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DepthSlope} +\alias{DepthSlope} +\title{DepthSlope indicator} +\usage{ +DepthSlope() +} +\description{ +DepthSlope indicator +} +\keyword{internal} diff --git a/bindings/r/man/DerivativeOscillator.Rd b/bindings/r/man/DerivativeOscillator.Rd new file mode 100644 index 00000000..fe3c3232 --- /dev/null +++ b/bindings/r/man/DerivativeOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DerivativeOscillator} +\alias{DerivativeOscillator} +\title{DerivativeOscillator indicator} +\usage{ +DerivativeOscillator(rsi_period, smooth1, smooth2, signal_period) +} +\description{ +DerivativeOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/DetrendedStdDev.Rd b/bindings/r/man/DetrendedStdDev.Rd new file mode 100644 index 00000000..30921273 --- /dev/null +++ b/bindings/r/man/DetrendedStdDev.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DetrendedStdDev} +\alias{DetrendedStdDev} +\title{DetrendedStdDev indicator} +\usage{ +DetrendedStdDev(period) +} +\description{ +DetrendedStdDev indicator +} +\keyword{internal} diff --git a/bindings/r/man/DisparityIndex.Rd b/bindings/r/man/DisparityIndex.Rd new file mode 100644 index 00000000..48bcd2f6 --- /dev/null +++ b/bindings/r/man/DisparityIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DisparityIndex} +\alias{DisparityIndex} +\title{DisparityIndex indicator} +\usage{ +DisparityIndex(period) +} +\description{ +DisparityIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/DistanceSsd.Rd b/bindings/r/man/DistanceSsd.Rd new file mode 100644 index 00000000..71e9079f --- /dev/null +++ b/bindings/r/man/DistanceSsd.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DistanceSsd} +\alias{DistanceSsd} +\title{DistanceSsd indicator} +\usage{ +DistanceSsd(period) +} +\description{ +DistanceSsd indicator +} +\keyword{internal} diff --git a/bindings/r/man/Doji.Rd b/bindings/r/man/Doji.Rd new file mode 100644 index 00000000..88d611b2 --- /dev/null +++ b/bindings/r/man/Doji.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Doji} +\alias{Doji} +\title{Doji indicator} +\usage{ +Doji() +} +\description{ +Doji indicator +} +\keyword{internal} diff --git a/bindings/r/man/DojiStar.Rd b/bindings/r/man/DojiStar.Rd new file mode 100644 index 00000000..36b2408e --- /dev/null +++ b/bindings/r/man/DojiStar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DojiStar} +\alias{DojiStar} +\title{DojiStar indicator} +\usage{ +DojiStar() +} +\description{ +DojiStar indicator +} +\keyword{internal} diff --git a/bindings/r/man/DollarBars.Rd b/bindings/r/man/DollarBars.Rd new file mode 100644 index 00000000..ff533de9 --- /dev/null +++ b/bindings/r/man/DollarBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DollarBars} +\alias{DollarBars} +\title{DollarBars indicator} +\usage{ +DollarBars(dollar_per_bar) +} +\description{ +DollarBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/Donchian.Rd b/bindings/r/man/Donchian.Rd new file mode 100644 index 00000000..8c96c977 --- /dev/null +++ b/bindings/r/man/Donchian.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Donchian} +\alias{Donchian} +\title{Donchian indicator} +\usage{ +Donchian(period) +} +\description{ +Donchian indicator +} +\keyword{internal} diff --git a/bindings/r/man/DonchianStop.Rd b/bindings/r/man/DonchianStop.Rd new file mode 100644 index 00000000..4a054c72 --- /dev/null +++ b/bindings/r/man/DonchianStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DonchianStop} +\alias{DonchianStop} +\title{DonchianStop indicator} +\usage{ +DonchianStop(period) +} +\description{ +DonchianStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/DoubleBollinger.Rd b/bindings/r/man/DoubleBollinger.Rd new file mode 100644 index 00000000..434407ee --- /dev/null +++ b/bindings/r/man/DoubleBollinger.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DoubleBollinger} +\alias{DoubleBollinger} +\title{DoubleBollinger indicator} +\usage{ +DoubleBollinger(period, k_inner, k_outer) +} +\description{ +DoubleBollinger indicator +} +\keyword{internal} diff --git a/bindings/r/man/DoubleTopBottom.Rd b/bindings/r/man/DoubleTopBottom.Rd new file mode 100644 index 00000000..4bd228cc --- /dev/null +++ b/bindings/r/man/DoubleTopBottom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DoubleTopBottom} +\alias{DoubleTopBottom} +\title{DoubleTopBottom indicator} +\usage{ +DoubleTopBottom() +} +\description{ +DoubleTopBottom indicator +} +\keyword{internal} diff --git a/bindings/r/man/DownsideGapThreeMethods.Rd b/bindings/r/man/DownsideGapThreeMethods.Rd new file mode 100644 index 00000000..9606d51d --- /dev/null +++ b/bindings/r/man/DownsideGapThreeMethods.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DownsideGapThreeMethods} +\alias{DownsideGapThreeMethods} +\title{DownsideGapThreeMethods indicator} +\usage{ +DownsideGapThreeMethods() +} +\description{ +DownsideGapThreeMethods indicator +} +\keyword{internal} diff --git a/bindings/r/man/Dpo.Rd b/bindings/r/man/Dpo.Rd new file mode 100644 index 00000000..440b122a --- /dev/null +++ b/bindings/r/man/Dpo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Dpo} +\alias{Dpo} +\title{Dpo indicator} +\usage{ +Dpo(period) +} +\description{ +Dpo indicator +} +\keyword{internal} diff --git a/bindings/r/man/DragonflyDoji.Rd b/bindings/r/man/DragonflyDoji.Rd new file mode 100644 index 00000000..3459f416 --- /dev/null +++ b/bindings/r/man/DragonflyDoji.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DragonflyDoji} +\alias{DragonflyDoji} +\title{DragonflyDoji indicator} +\usage{ +DragonflyDoji() +} +\description{ +DragonflyDoji indicator +} +\keyword{internal} diff --git a/bindings/r/man/DrawdownDuration.Rd b/bindings/r/man/DrawdownDuration.Rd new file mode 100644 index 00000000..24ce3a8a --- /dev/null +++ b/bindings/r/man/DrawdownDuration.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DrawdownDuration} +\alias{DrawdownDuration} +\title{DrawdownDuration indicator} +\usage{ +DrawdownDuration() +} +\description{ +DrawdownDuration indicator +} +\keyword{internal} diff --git a/bindings/r/man/DumplingTop.Rd b/bindings/r/man/DumplingTop.Rd new file mode 100644 index 00000000..8a4b2acf --- /dev/null +++ b/bindings/r/man/DumplingTop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DumplingTop} +\alias{DumplingTop} +\title{DumplingTop indicator} +\usage{ +DumplingTop(period) +} +\description{ +DumplingTop indicator +} +\keyword{internal} diff --git a/bindings/r/man/Dx.Rd b/bindings/r/man/Dx.Rd new file mode 100644 index 00000000..f4535cf3 --- /dev/null +++ b/bindings/r/man/Dx.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Dx} +\alias{Dx} +\title{Dx indicator} +\usage{ +Dx(period) +} +\description{ +Dx indicator +} +\keyword{internal} diff --git a/bindings/r/man/DynamicMomentumIndex.Rd b/bindings/r/man/DynamicMomentumIndex.Rd new file mode 100644 index 00000000..93963e86 --- /dev/null +++ b/bindings/r/man/DynamicMomentumIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{DynamicMomentumIndex} +\alias{DynamicMomentumIndex} +\title{DynamicMomentumIndex indicator} +\usage{ +DynamicMomentumIndex(period) +} +\description{ +DynamicMomentumIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/EaseOfMovement.Rd b/bindings/r/man/EaseOfMovement.Rd new file mode 100644 index 00000000..d966f17f --- /dev/null +++ b/bindings/r/man/EaseOfMovement.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EaseOfMovement} +\alias{EaseOfMovement} +\title{EaseOfMovement indicator} +\usage{ +EaseOfMovement(period) +} +\description{ +EaseOfMovement indicator +} +\keyword{internal} diff --git a/bindings/r/man/EffectiveSpread.Rd b/bindings/r/man/EffectiveSpread.Rd new file mode 100644 index 00000000..250ab0b4 --- /dev/null +++ b/bindings/r/man/EffectiveSpread.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EffectiveSpread} +\alias{EffectiveSpread} +\title{EffectiveSpread indicator} +\usage{ +EffectiveSpread() +} +\description{ +EffectiveSpread indicator +} +\keyword{internal} diff --git a/bindings/r/man/EhlersStochastic.Rd b/bindings/r/man/EhlersStochastic.Rd new file mode 100644 index 00000000..ba1962d6 --- /dev/null +++ b/bindings/r/man/EhlersStochastic.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EhlersStochastic} +\alias{EhlersStochastic} +\title{EhlersStochastic indicator} +\usage{ +EhlersStochastic(period) +} +\description{ +EhlersStochastic indicator +} +\keyword{internal} diff --git a/bindings/r/man/Ehma.Rd b/bindings/r/man/Ehma.Rd new file mode 100644 index 00000000..e4502280 --- /dev/null +++ b/bindings/r/man/Ehma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Ehma} +\alias{Ehma} +\title{Ehma indicator} +\usage{ +Ehma(period) +} +\description{ +Ehma indicator +} +\keyword{internal} diff --git a/bindings/r/man/ElderImpulse.Rd b/bindings/r/man/ElderImpulse.Rd new file mode 100644 index 00000000..51459a00 --- /dev/null +++ b/bindings/r/man/ElderImpulse.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ElderImpulse} +\alias{ElderImpulse} +\title{ElderImpulse indicator} +\usage{ +ElderImpulse(ema_period, macd_fast, macd_slow, macd_signal) +} +\description{ +ElderImpulse indicator +} +\keyword{internal} diff --git a/bindings/r/man/ElderRay.Rd b/bindings/r/man/ElderRay.Rd new file mode 100644 index 00000000..e9fe3ac0 --- /dev/null +++ b/bindings/r/man/ElderRay.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ElderRay} +\alias{ElderRay} +\title{ElderRay indicator} +\usage{ +ElderRay(period) +} +\description{ +ElderRay indicator +} +\keyword{internal} diff --git a/bindings/r/man/ElderSafeZone.Rd b/bindings/r/man/ElderSafeZone.Rd new file mode 100644 index 00000000..761504b7 --- /dev/null +++ b/bindings/r/man/ElderSafeZone.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ElderSafeZone} +\alias{ElderSafeZone} +\title{ElderSafeZone indicator} +\usage{ +ElderSafeZone(period, coeff) +} +\description{ +ElderSafeZone indicator +} +\keyword{internal} diff --git a/bindings/r/man/Ema.Rd b/bindings/r/man/Ema.Rd new file mode 100644 index 00000000..85c8bd8a --- /dev/null +++ b/bindings/r/man/Ema.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Ema} +\alias{Ema} +\title{Ema indicator} +\usage{ +Ema(period) +} +\description{ +Ema indicator +} +\keyword{internal} diff --git a/bindings/r/man/EmpiricalModeDecomposition.Rd b/bindings/r/man/EmpiricalModeDecomposition.Rd new file mode 100644 index 00000000..1619de01 --- /dev/null +++ b/bindings/r/man/EmpiricalModeDecomposition.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EmpiricalModeDecomposition} +\alias{EmpiricalModeDecomposition} +\title{EmpiricalModeDecomposition indicator} +\usage{ +EmpiricalModeDecomposition(period, fraction) +} +\description{ +EmpiricalModeDecomposition indicator +} +\keyword{internal} diff --git a/bindings/r/man/Engulfing.Rd b/bindings/r/man/Engulfing.Rd new file mode 100644 index 00000000..418df669 --- /dev/null +++ b/bindings/r/man/Engulfing.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Engulfing} +\alias{Engulfing} +\title{Engulfing indicator} +\usage{ +Engulfing() +} +\description{ +Engulfing indicator +} +\keyword{internal} diff --git a/bindings/r/man/Equivolume.Rd b/bindings/r/man/Equivolume.Rd new file mode 100644 index 00000000..cc3b7a47 --- /dev/null +++ b/bindings/r/man/Equivolume.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Equivolume} +\alias{Equivolume} +\title{Equivolume indicator} +\usage{ +Equivolume(period) +} +\description{ +Equivolume indicator +} +\keyword{internal} diff --git a/bindings/r/man/EstimatedLeverageRatio.Rd b/bindings/r/man/EstimatedLeverageRatio.Rd new file mode 100644 index 00000000..1fb4f05d --- /dev/null +++ b/bindings/r/man/EstimatedLeverageRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EstimatedLeverageRatio} +\alias{EstimatedLeverageRatio} +\title{EstimatedLeverageRatio indicator} +\usage{ +EstimatedLeverageRatio() +} +\description{ +EstimatedLeverageRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/EvenBetterSinewave.Rd b/bindings/r/man/EvenBetterSinewave.Rd new file mode 100644 index 00000000..4738a341 --- /dev/null +++ b/bindings/r/man/EvenBetterSinewave.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EvenBetterSinewave} +\alias{EvenBetterSinewave} +\title{EvenBetterSinewave indicator} +\usage{ +EvenBetterSinewave(hp_period, ssf_length) +} +\description{ +EvenBetterSinewave indicator +} +\keyword{internal} diff --git a/bindings/r/man/EveningDojiStar.Rd b/bindings/r/man/EveningDojiStar.Rd new file mode 100644 index 00000000..ffbe2436 --- /dev/null +++ b/bindings/r/man/EveningDojiStar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EveningDojiStar} +\alias{EveningDojiStar} +\title{EveningDojiStar indicator} +\usage{ +EveningDojiStar() +} +\description{ +EveningDojiStar indicator +} +\keyword{internal} diff --git a/bindings/r/man/Evwma.Rd b/bindings/r/man/Evwma.Rd new file mode 100644 index 00000000..fdf94e63 --- /dev/null +++ b/bindings/r/man/Evwma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Evwma} +\alias{Evwma} +\title{Evwma indicator} +\usage{ +Evwma(period) +} +\description{ +Evwma indicator +} +\keyword{internal} diff --git a/bindings/r/man/EwmaVolatility.Rd b/bindings/r/man/EwmaVolatility.Rd new file mode 100644 index 00000000..4ba78fcf --- /dev/null +++ b/bindings/r/man/EwmaVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{EwmaVolatility} +\alias{EwmaVolatility} +\title{EwmaVolatility indicator} +\usage{ +EwmaVolatility(lambda) +} +\description{ +EwmaVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/Expectancy.Rd b/bindings/r/man/Expectancy.Rd new file mode 100644 index 00000000..6b6ff54f --- /dev/null +++ b/bindings/r/man/Expectancy.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Expectancy} +\alias{Expectancy} +\title{Expectancy indicator} +\usage{ +Expectancy(period) +} +\description{ +Expectancy indicator +} +\keyword{internal} diff --git a/bindings/r/man/FallingThreeMethods.Rd b/bindings/r/man/FallingThreeMethods.Rd new file mode 100644 index 00000000..12df5986 --- /dev/null +++ b/bindings/r/man/FallingThreeMethods.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FallingThreeMethods} +\alias{FallingThreeMethods} +\title{FallingThreeMethods indicator} +\usage{ +FallingThreeMethods() +} +\description{ +FallingThreeMethods indicator +} +\keyword{internal} diff --git a/bindings/r/man/Fama.Rd b/bindings/r/man/Fama.Rd new file mode 100644 index 00000000..88cff4f5 --- /dev/null +++ b/bindings/r/man/Fama.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Fama} +\alias{Fama} +\title{Fama indicator} +\usage{ +Fama(fast_limit, slow_limit) +} +\description{ +Fama indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibArcs.Rd b/bindings/r/man/FibArcs.Rd new file mode 100644 index 00000000..8580b45d --- /dev/null +++ b/bindings/r/man/FibArcs.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibArcs} +\alias{FibArcs} +\title{FibArcs indicator} +\usage{ +FibArcs() +} +\description{ +FibArcs indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibChannel.Rd b/bindings/r/man/FibChannel.Rd new file mode 100644 index 00000000..09d55149 --- /dev/null +++ b/bindings/r/man/FibChannel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibChannel} +\alias{FibChannel} +\title{FibChannel indicator} +\usage{ +FibChannel() +} +\description{ +FibChannel indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibConfluence.Rd b/bindings/r/man/FibConfluence.Rd new file mode 100644 index 00000000..bb74fa1a --- /dev/null +++ b/bindings/r/man/FibConfluence.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibConfluence} +\alias{FibConfluence} +\title{FibConfluence indicator} +\usage{ +FibConfluence() +} +\description{ +FibConfluence indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibExtension.Rd b/bindings/r/man/FibExtension.Rd new file mode 100644 index 00000000..bb96fc84 --- /dev/null +++ b/bindings/r/man/FibExtension.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibExtension} +\alias{FibExtension} +\title{FibExtension indicator} +\usage{ +FibExtension() +} +\description{ +FibExtension indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibFan.Rd b/bindings/r/man/FibFan.Rd new file mode 100644 index 00000000..0ed50047 --- /dev/null +++ b/bindings/r/man/FibFan.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibFan} +\alias{FibFan} +\title{FibFan indicator} +\usage{ +FibFan() +} +\description{ +FibFan indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibProjection.Rd b/bindings/r/man/FibProjection.Rd new file mode 100644 index 00000000..ae348d08 --- /dev/null +++ b/bindings/r/man/FibProjection.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibProjection} +\alias{FibProjection} +\title{FibProjection indicator} +\usage{ +FibProjection() +} +\description{ +FibProjection indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibRetracement.Rd b/bindings/r/man/FibRetracement.Rd new file mode 100644 index 00000000..f12943bb --- /dev/null +++ b/bindings/r/man/FibRetracement.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibRetracement} +\alias{FibRetracement} +\title{FibRetracement indicator} +\usage{ +FibRetracement() +} +\description{ +FibRetracement indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibTimeZones.Rd b/bindings/r/man/FibTimeZones.Rd new file mode 100644 index 00000000..d0753baf --- /dev/null +++ b/bindings/r/man/FibTimeZones.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibTimeZones} +\alias{FibTimeZones} +\title{FibTimeZones indicator} +\usage{ +FibTimeZones() +} +\description{ +FibTimeZones indicator +} +\keyword{internal} diff --git a/bindings/r/man/FibonacciPivots.Rd b/bindings/r/man/FibonacciPivots.Rd new file mode 100644 index 00000000..2f3b0cdc --- /dev/null +++ b/bindings/r/man/FibonacciPivots.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FibonacciPivots} +\alias{FibonacciPivots} +\title{FibonacciPivots indicator} +\usage{ +FibonacciPivots() +} +\description{ +FibonacciPivots indicator +} +\keyword{internal} diff --git a/bindings/r/man/FisherRsi.Rd b/bindings/r/man/FisherRsi.Rd new file mode 100644 index 00000000..88ed3653 --- /dev/null +++ b/bindings/r/man/FisherRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FisherRsi} +\alias{FisherRsi} +\title{FisherRsi indicator} +\usage{ +FisherRsi(period) +} +\description{ +FisherRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/FisherTransform.Rd b/bindings/r/man/FisherTransform.Rd new file mode 100644 index 00000000..579a10b4 --- /dev/null +++ b/bindings/r/man/FisherTransform.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FisherTransform} +\alias{FisherTransform} +\title{FisherTransform indicator} +\usage{ +FisherTransform(period) +} +\description{ +FisherTransform indicator +} +\keyword{internal} diff --git a/bindings/r/man/FlagPennant.Rd b/bindings/r/man/FlagPennant.Rd new file mode 100644 index 00000000..80ed4846 --- /dev/null +++ b/bindings/r/man/FlagPennant.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FlagPennant} +\alias{FlagPennant} +\title{FlagPennant indicator} +\usage{ +FlagPennant() +} +\description{ +FlagPennant indicator +} +\keyword{internal} diff --git a/bindings/r/man/Footprint.Rd b/bindings/r/man/Footprint.Rd new file mode 100644 index 00000000..ebd77174 --- /dev/null +++ b/bindings/r/man/Footprint.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Footprint} +\alias{Footprint} +\title{Footprint indicator} +\usage{ +Footprint(tick_size) +} +\description{ +Footprint indicator +} +\keyword{internal} diff --git a/bindings/r/man/ForceIndex.Rd b/bindings/r/man/ForceIndex.Rd new file mode 100644 index 00000000..5784106b --- /dev/null +++ b/bindings/r/man/ForceIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ForceIndex} +\alias{ForceIndex} +\title{ForceIndex indicator} +\usage{ +ForceIndex(period) +} +\description{ +ForceIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/FractalChaosBands.Rd b/bindings/r/man/FractalChaosBands.Rd new file mode 100644 index 00000000..3c09ae8c --- /dev/null +++ b/bindings/r/man/FractalChaosBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FractalChaosBands} +\alias{FractalChaosBands} +\title{FractalChaosBands indicator} +\usage{ +FractalChaosBands(k) +} +\description{ +FractalChaosBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/Frama.Rd b/bindings/r/man/Frama.Rd new file mode 100644 index 00000000..c7e67e2c --- /dev/null +++ b/bindings/r/man/Frama.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Frama} +\alias{Frama} +\title{Frama indicator} +\usage{ +Frama(period) +} +\description{ +Frama indicator +} +\keyword{internal} diff --git a/bindings/r/man/FryPanBottom.Rd b/bindings/r/man/FryPanBottom.Rd new file mode 100644 index 00000000..ed5c7959 --- /dev/null +++ b/bindings/r/man/FryPanBottom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FryPanBottom} +\alias{FryPanBottom} +\title{FryPanBottom indicator} +\usage{ +FryPanBottom(period) +} +\description{ +FryPanBottom indicator +} +\keyword{internal} diff --git a/bindings/r/man/FundingBasis.Rd b/bindings/r/man/FundingBasis.Rd new file mode 100644 index 00000000..7c7f72fa --- /dev/null +++ b/bindings/r/man/FundingBasis.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FundingBasis} +\alias{FundingBasis} +\title{FundingBasis indicator} +\usage{ +FundingBasis() +} +\description{ +FundingBasis indicator +} +\keyword{internal} diff --git a/bindings/r/man/FundingImpliedApr.Rd b/bindings/r/man/FundingImpliedApr.Rd new file mode 100644 index 00000000..72a3d212 --- /dev/null +++ b/bindings/r/man/FundingImpliedApr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FundingImpliedApr} +\alias{FundingImpliedApr} +\title{FundingImpliedApr indicator} +\usage{ +FundingImpliedApr(intervals_per_year) +} +\description{ +FundingImpliedApr indicator +} +\keyword{internal} diff --git a/bindings/r/man/FundingRate.Rd b/bindings/r/man/FundingRate.Rd new file mode 100644 index 00000000..b095371a --- /dev/null +++ b/bindings/r/man/FundingRate.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FundingRate} +\alias{FundingRate} +\title{FundingRate indicator} +\usage{ +FundingRate() +} +\description{ +FundingRate indicator +} +\keyword{internal} diff --git a/bindings/r/man/FundingRateMean.Rd b/bindings/r/man/FundingRateMean.Rd new file mode 100644 index 00000000..40c96099 --- /dev/null +++ b/bindings/r/man/FundingRateMean.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FundingRateMean} +\alias{FundingRateMean} +\title{FundingRateMean indicator} +\usage{ +FundingRateMean(window) +} +\description{ +FundingRateMean indicator +} +\keyword{internal} diff --git a/bindings/r/man/FundingRateZScore.Rd b/bindings/r/man/FundingRateZScore.Rd new file mode 100644 index 00000000..ce41e6bd --- /dev/null +++ b/bindings/r/man/FundingRateZScore.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{FundingRateZScore} +\alias{FundingRateZScore} +\title{FundingRateZScore indicator} +\usage{ +FundingRateZScore(window) +} +\description{ +FundingRateZScore indicator +} +\keyword{internal} diff --git a/bindings/r/man/GainLossRatio.Rd b/bindings/r/man/GainLossRatio.Rd new file mode 100644 index 00000000..eb769824 --- /dev/null +++ b/bindings/r/man/GainLossRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GainLossRatio} +\alias{GainLossRatio} +\title{GainLossRatio indicator} +\usage{ +GainLossRatio(period) +} +\description{ +GainLossRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/GainToPainRatio.Rd b/bindings/r/man/GainToPainRatio.Rd new file mode 100644 index 00000000..45871a37 --- /dev/null +++ b/bindings/r/man/GainToPainRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GainToPainRatio} +\alias{GainToPainRatio} +\title{GainToPainRatio indicator} +\usage{ +GainToPainRatio(period) +} +\description{ +GainToPainRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/GapSideBySideWhite.Rd b/bindings/r/man/GapSideBySideWhite.Rd new file mode 100644 index 00000000..7e9c8ba2 --- /dev/null +++ b/bindings/r/man/GapSideBySideWhite.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GapSideBySideWhite} +\alias{GapSideBySideWhite} +\title{GapSideBySideWhite indicator} +\usage{ +GapSideBySideWhite() +} +\description{ +GapSideBySideWhite indicator +} +\keyword{internal} diff --git a/bindings/r/man/Garch11.Rd b/bindings/r/man/Garch11.Rd new file mode 100644 index 00000000..17a3816c --- /dev/null +++ b/bindings/r/man/Garch11.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Garch11} +\alias{Garch11} +\title{Garch11 indicator} +\usage{ +Garch11(omega, alpha, beta) +} +\description{ +Garch11 indicator +} +\keyword{internal} diff --git a/bindings/r/man/GarmanKlassVolatility.Rd b/bindings/r/man/GarmanKlassVolatility.Rd new file mode 100644 index 00000000..42e244b9 --- /dev/null +++ b/bindings/r/man/GarmanKlassVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GarmanKlassVolatility} +\alias{GarmanKlassVolatility} +\title{GarmanKlassVolatility indicator} +\usage{ +GarmanKlassVolatility(period, trading_periods) +} +\description{ +GarmanKlassVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/Gartley.Rd b/bindings/r/man/Gartley.Rd new file mode 100644 index 00000000..1c481566 --- /dev/null +++ b/bindings/r/man/Gartley.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Gartley} +\alias{Gartley} +\title{Gartley indicator} +\usage{ +Gartley() +} +\description{ +Gartley indicator +} +\keyword{internal} diff --git a/bindings/r/man/GatorOscillator.Rd b/bindings/r/man/GatorOscillator.Rd new file mode 100644 index 00000000..8df1b0c8 --- /dev/null +++ b/bindings/r/man/GatorOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GatorOscillator} +\alias{GatorOscillator} +\title{GatorOscillator indicator} +\usage{ +GatorOscillator(jaw_period, teeth_period, lips_period) +} +\description{ +GatorOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/GeneralizedDema.Rd b/bindings/r/man/GeneralizedDema.Rd new file mode 100644 index 00000000..631b93d4 --- /dev/null +++ b/bindings/r/man/GeneralizedDema.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GeneralizedDema} +\alias{GeneralizedDema} +\title{GeneralizedDema indicator} +\usage{ +GeneralizedDema(period, v) +} +\description{ +GeneralizedDema indicator +} +\keyword{internal} diff --git a/bindings/r/man/GeometricMa.Rd b/bindings/r/man/GeometricMa.Rd new file mode 100644 index 00000000..d4982c6b --- /dev/null +++ b/bindings/r/man/GeometricMa.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GeometricMa} +\alias{GeometricMa} +\title{GeometricMa indicator} +\usage{ +GeometricMa(period) +} +\description{ +GeometricMa indicator +} +\keyword{internal} diff --git a/bindings/r/man/GoldenPocket.Rd b/bindings/r/man/GoldenPocket.Rd new file mode 100644 index 00000000..46ebb591 --- /dev/null +++ b/bindings/r/man/GoldenPocket.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GoldenPocket} +\alias{GoldenPocket} +\title{GoldenPocket indicator} +\usage{ +GoldenPocket() +} +\description{ +GoldenPocket indicator +} +\keyword{internal} diff --git a/bindings/r/man/GrangerCausality.Rd b/bindings/r/man/GrangerCausality.Rd new file mode 100644 index 00000000..64b035a6 --- /dev/null +++ b/bindings/r/man/GrangerCausality.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GrangerCausality} +\alias{GrangerCausality} +\title{GrangerCausality indicator} +\usage{ +GrangerCausality(period, lag) +} +\description{ +GrangerCausality indicator +} +\keyword{internal} diff --git a/bindings/r/man/GravestoneDoji.Rd b/bindings/r/man/GravestoneDoji.Rd new file mode 100644 index 00000000..053fd629 --- /dev/null +++ b/bindings/r/man/GravestoneDoji.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{GravestoneDoji} +\alias{GravestoneDoji} +\title{GravestoneDoji indicator} +\usage{ +GravestoneDoji() +} +\description{ +GravestoneDoji indicator +} +\keyword{internal} diff --git a/bindings/r/man/Hammer.Rd b/bindings/r/man/Hammer.Rd new file mode 100644 index 00000000..b8fc7a96 --- /dev/null +++ b/bindings/r/man/Hammer.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Hammer} +\alias{Hammer} +\title{Hammer indicator} +\usage{ +Hammer() +} +\description{ +Hammer indicator +} +\keyword{internal} diff --git a/bindings/r/man/HangingMan.Rd b/bindings/r/man/HangingMan.Rd new file mode 100644 index 00000000..30513bbf --- /dev/null +++ b/bindings/r/man/HangingMan.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HangingMan} +\alias{HangingMan} +\title{HangingMan indicator} +\usage{ +HangingMan() +} +\description{ +HangingMan indicator +} +\keyword{internal} diff --git a/bindings/r/man/Harami.Rd b/bindings/r/man/Harami.Rd new file mode 100644 index 00000000..7cadc86b --- /dev/null +++ b/bindings/r/man/Harami.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Harami} +\alias{Harami} +\title{Harami indicator} +\usage{ +Harami() +} +\description{ +Harami indicator +} +\keyword{internal} diff --git a/bindings/r/man/HaramiCross.Rd b/bindings/r/man/HaramiCross.Rd new file mode 100644 index 00000000..1da963de --- /dev/null +++ b/bindings/r/man/HaramiCross.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HaramiCross} +\alias{HaramiCross} +\title{HaramiCross indicator} +\usage{ +HaramiCross() +} +\description{ +HaramiCross indicator +} +\keyword{internal} diff --git a/bindings/r/man/HasbrouckInformationShare.Rd b/bindings/r/man/HasbrouckInformationShare.Rd new file mode 100644 index 00000000..01f7a467 --- /dev/null +++ b/bindings/r/man/HasbrouckInformationShare.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HasbrouckInformationShare} +\alias{HasbrouckInformationShare} +\title{HasbrouckInformationShare indicator} +\usage{ +HasbrouckInformationShare(period) +} +\description{ +HasbrouckInformationShare indicator +} +\keyword{internal} diff --git a/bindings/r/man/HeadAndShoulders.Rd b/bindings/r/man/HeadAndShoulders.Rd new file mode 100644 index 00000000..911e76eb --- /dev/null +++ b/bindings/r/man/HeadAndShoulders.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HeadAndShoulders} +\alias{HeadAndShoulders} +\title{HeadAndShoulders indicator} +\usage{ +HeadAndShoulders() +} +\description{ +HeadAndShoulders indicator +} +\keyword{internal} diff --git a/bindings/r/man/HeikinAshi.Rd b/bindings/r/man/HeikinAshi.Rd new file mode 100644 index 00000000..5ffa10a3 --- /dev/null +++ b/bindings/r/man/HeikinAshi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HeikinAshi} +\alias{HeikinAshi} +\title{HeikinAshi indicator} +\usage{ +HeikinAshi() +} +\description{ +HeikinAshi indicator +} +\keyword{internal} diff --git a/bindings/r/man/HeikinAshiOscillator.Rd b/bindings/r/man/HeikinAshiOscillator.Rd new file mode 100644 index 00000000..7e137787 --- /dev/null +++ b/bindings/r/man/HeikinAshiOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HeikinAshiOscillator} +\alias{HeikinAshiOscillator} +\title{HeikinAshiOscillator indicator} +\usage{ +HeikinAshiOscillator(period) +} +\description{ +HeikinAshiOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/HiLoActivator.Rd b/bindings/r/man/HiLoActivator.Rd new file mode 100644 index 00000000..8a2032ae --- /dev/null +++ b/bindings/r/man/HiLoActivator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HiLoActivator} +\alias{HiLoActivator} +\title{HiLoActivator indicator} +\usage{ +HiLoActivator(period) +} +\description{ +HiLoActivator indicator +} +\keyword{internal} diff --git a/bindings/r/man/HighLowIndex.Rd b/bindings/r/man/HighLowIndex.Rd new file mode 100644 index 00000000..fa3d47d0 --- /dev/null +++ b/bindings/r/man/HighLowIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HighLowIndex} +\alias{HighLowIndex} +\title{HighLowIndex indicator} +\usage{ +HighLowIndex(period) +} +\description{ +HighLowIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/HighLowRange.Rd b/bindings/r/man/HighLowRange.Rd new file mode 100644 index 00000000..c812ef81 --- /dev/null +++ b/bindings/r/man/HighLowRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HighLowRange} +\alias{HighLowRange} +\title{HighLowRange indicator} +\usage{ +HighLowRange() +} +\description{ +HighLowRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/HighLowVolumeNodes.Rd b/bindings/r/man/HighLowVolumeNodes.Rd new file mode 100644 index 00000000..fcde74ac --- /dev/null +++ b/bindings/r/man/HighLowVolumeNodes.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HighLowVolumeNodes} +\alias{HighLowVolumeNodes} +\title{HighLowVolumeNodes indicator} +\usage{ +HighLowVolumeNodes(period, bins) +} +\description{ +HighLowVolumeNodes indicator +} +\keyword{internal} diff --git a/bindings/r/man/HighWave.Rd b/bindings/r/man/HighWave.Rd new file mode 100644 index 00000000..f8d248c0 --- /dev/null +++ b/bindings/r/man/HighWave.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HighWave} +\alias{HighWave} +\title{HighWave indicator} +\usage{ +HighWave() +} +\description{ +HighWave indicator +} +\keyword{internal} diff --git a/bindings/r/man/HighpassFilter.Rd b/bindings/r/man/HighpassFilter.Rd new file mode 100644 index 00000000..49e018da --- /dev/null +++ b/bindings/r/man/HighpassFilter.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HighpassFilter} +\alias{HighpassFilter} +\title{HighpassFilter indicator} +\usage{ +HighpassFilter(period) +} +\description{ +HighpassFilter indicator +} +\keyword{internal} diff --git a/bindings/r/man/Hikkake.Rd b/bindings/r/man/Hikkake.Rd new file mode 100644 index 00000000..b2953228 --- /dev/null +++ b/bindings/r/man/Hikkake.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Hikkake} +\alias{Hikkake} +\title{Hikkake indicator} +\usage{ +Hikkake() +} +\description{ +Hikkake indicator +} +\keyword{internal} diff --git a/bindings/r/man/HikkakeModified.Rd b/bindings/r/man/HikkakeModified.Rd new file mode 100644 index 00000000..28cb8298 --- /dev/null +++ b/bindings/r/man/HikkakeModified.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HikkakeModified} +\alias{HikkakeModified} +\title{HikkakeModified indicator} +\usage{ +HikkakeModified() +} +\description{ +HikkakeModified indicator +} +\keyword{internal} diff --git a/bindings/r/man/HilbertDominantCycle.Rd b/bindings/r/man/HilbertDominantCycle.Rd new file mode 100644 index 00000000..54182cf6 --- /dev/null +++ b/bindings/r/man/HilbertDominantCycle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HilbertDominantCycle} +\alias{HilbertDominantCycle} +\title{HilbertDominantCycle indicator} +\usage{ +HilbertDominantCycle() +} +\description{ +HilbertDominantCycle indicator +} +\keyword{internal} diff --git a/bindings/r/man/HistoricalVolatility.Rd b/bindings/r/man/HistoricalVolatility.Rd new file mode 100644 index 00000000..f23f8d42 --- /dev/null +++ b/bindings/r/man/HistoricalVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HistoricalVolatility} +\alias{HistoricalVolatility} +\title{HistoricalVolatility indicator} +\usage{ +HistoricalVolatility(period, trading_periods) +} +\description{ +HistoricalVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/Hma.Rd b/bindings/r/man/Hma.Rd new file mode 100644 index 00000000..9e4076b2 --- /dev/null +++ b/bindings/r/man/Hma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Hma} +\alias{Hma} +\title{Hma indicator} +\usage{ +Hma(period) +} +\description{ +Hma indicator +} +\keyword{internal} diff --git a/bindings/r/man/HoltWinters.Rd b/bindings/r/man/HoltWinters.Rd new file mode 100644 index 00000000..31493b20 --- /dev/null +++ b/bindings/r/man/HoltWinters.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HoltWinters} +\alias{HoltWinters} +\title{HoltWinters indicator} +\usage{ +HoltWinters(alpha, beta) +} +\description{ +HoltWinters indicator +} +\keyword{internal} diff --git a/bindings/r/man/HomingPigeon.Rd b/bindings/r/man/HomingPigeon.Rd new file mode 100644 index 00000000..616098f2 --- /dev/null +++ b/bindings/r/man/HomingPigeon.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HomingPigeon} +\alias{HomingPigeon} +\title{HomingPigeon indicator} +\usage{ +HomingPigeon() +} +\description{ +HomingPigeon indicator +} +\keyword{internal} diff --git a/bindings/r/man/HtDcPhase.Rd b/bindings/r/man/HtDcPhase.Rd new file mode 100644 index 00000000..2d20d584 --- /dev/null +++ b/bindings/r/man/HtDcPhase.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HtDcPhase} +\alias{HtDcPhase} +\title{HtDcPhase indicator} +\usage{ +HtDcPhase() +} +\description{ +HtDcPhase indicator +} +\keyword{internal} diff --git a/bindings/r/man/HtPhasor.Rd b/bindings/r/man/HtPhasor.Rd new file mode 100644 index 00000000..fe30b9c4 --- /dev/null +++ b/bindings/r/man/HtPhasor.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HtPhasor} +\alias{HtPhasor} +\title{HtPhasor indicator} +\usage{ +HtPhasor() +} +\description{ +HtPhasor indicator +} +\keyword{internal} diff --git a/bindings/r/man/HtTrendMode.Rd b/bindings/r/man/HtTrendMode.Rd new file mode 100644 index 00000000..ad24c38a --- /dev/null +++ b/bindings/r/man/HtTrendMode.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HtTrendMode} +\alias{HtTrendMode} +\title{HtTrendMode indicator} +\usage{ +HtTrendMode() +} +\description{ +HtTrendMode indicator +} +\keyword{internal} diff --git a/bindings/r/man/HurstChannel.Rd b/bindings/r/man/HurstChannel.Rd new file mode 100644 index 00000000..adaf63ff --- /dev/null +++ b/bindings/r/man/HurstChannel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HurstChannel} +\alias{HurstChannel} +\title{HurstChannel indicator} +\usage{ +HurstChannel(period, multiplier) +} +\description{ +HurstChannel indicator +} +\keyword{internal} diff --git a/bindings/r/man/HurstExponent.Rd b/bindings/r/man/HurstExponent.Rd new file mode 100644 index 00000000..e84850fa --- /dev/null +++ b/bindings/r/man/HurstExponent.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{HurstExponent} +\alias{HurstExponent} +\title{HurstExponent indicator} +\usage{ +HurstExponent(period, chunks) +} +\description{ +HurstExponent indicator +} +\keyword{internal} diff --git a/bindings/r/man/Ichimoku.Rd b/bindings/r/man/Ichimoku.Rd new file mode 100644 index 00000000..405cf7ba --- /dev/null +++ b/bindings/r/man/Ichimoku.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Ichimoku} +\alias{Ichimoku} +\title{Ichimoku indicator} +\usage{ +Ichimoku(tenkan_period, kijun_period, senkou_b_period, displacement) +} +\description{ +Ichimoku indicator +} +\keyword{internal} diff --git a/bindings/r/man/IdenticalThreeCrows.Rd b/bindings/r/man/IdenticalThreeCrows.Rd new file mode 100644 index 00000000..d18af911 --- /dev/null +++ b/bindings/r/man/IdenticalThreeCrows.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{IdenticalThreeCrows} +\alias{IdenticalThreeCrows} +\title{IdenticalThreeCrows indicator} +\usage{ +IdenticalThreeCrows() +} +\description{ +IdenticalThreeCrows indicator +} +\keyword{internal} diff --git a/bindings/r/man/ImbalanceBars.Rd b/bindings/r/man/ImbalanceBars.Rd new file mode 100644 index 00000000..774aa062 --- /dev/null +++ b/bindings/r/man/ImbalanceBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ImbalanceBars} +\alias{ImbalanceBars} +\title{ImbalanceBars indicator} +\usage{ +ImbalanceBars(threshold) +} +\description{ +ImbalanceBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/InNeck.Rd b/bindings/r/man/InNeck.Rd new file mode 100644 index 00000000..bb8f774f --- /dev/null +++ b/bindings/r/man/InNeck.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InNeck} +\alias{InNeck} +\title{InNeck indicator} +\usage{ +InNeck() +} +\description{ +InNeck indicator +} +\keyword{internal} diff --git a/bindings/r/man/Inertia.Rd b/bindings/r/man/Inertia.Rd new file mode 100644 index 00000000..93502800 --- /dev/null +++ b/bindings/r/man/Inertia.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Inertia} +\alias{Inertia} +\title{Inertia indicator} +\usage{ +Inertia(rvi_period, linreg_period) +} +\description{ +Inertia indicator +} +\keyword{internal} diff --git a/bindings/r/man/InformationRatio.Rd b/bindings/r/man/InformationRatio.Rd new file mode 100644 index 00000000..1b3dac7d --- /dev/null +++ b/bindings/r/man/InformationRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InformationRatio} +\alias{InformationRatio} +\title{InformationRatio indicator} +\usage{ +InformationRatio(period) +} +\description{ +InformationRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/InitialBalance.Rd b/bindings/r/man/InitialBalance.Rd new file mode 100644 index 00000000..33fe20b0 --- /dev/null +++ b/bindings/r/man/InitialBalance.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InitialBalance} +\alias{InitialBalance} +\title{InitialBalance indicator} +\usage{ +InitialBalance(period) +} +\description{ +InitialBalance indicator +} +\keyword{internal} diff --git a/bindings/r/man/InstantaneousTrendline.Rd b/bindings/r/man/InstantaneousTrendline.Rd new file mode 100644 index 00000000..493020c3 --- /dev/null +++ b/bindings/r/man/InstantaneousTrendline.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InstantaneousTrendline} +\alias{InstantaneousTrendline} +\title{InstantaneousTrendline indicator} +\usage{ +InstantaneousTrendline(period) +} +\description{ +InstantaneousTrendline indicator +} +\keyword{internal} diff --git a/bindings/r/man/IntradayIntensity.Rd b/bindings/r/man/IntradayIntensity.Rd new file mode 100644 index 00000000..669b2029 --- /dev/null +++ b/bindings/r/man/IntradayIntensity.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{IntradayIntensity} +\alias{IntradayIntensity} +\title{IntradayIntensity indicator} +\usage{ +IntradayIntensity() +} +\description{ +IntradayIntensity indicator +} +\keyword{internal} diff --git a/bindings/r/man/IntradayMomentumIndex.Rd b/bindings/r/man/IntradayMomentumIndex.Rd new file mode 100644 index 00000000..92f3b5d8 --- /dev/null +++ b/bindings/r/man/IntradayMomentumIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{IntradayMomentumIndex} +\alias{IntradayMomentumIndex} +\title{IntradayMomentumIndex indicator} +\usage{ +IntradayMomentumIndex(period) +} +\description{ +IntradayMomentumIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/IntradayVolatilityProfile.Rd b/bindings/r/man/IntradayVolatilityProfile.Rd new file mode 100644 index 00000000..12e841bf --- /dev/null +++ b/bindings/r/man/IntradayVolatilityProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{IntradayVolatilityProfile} +\alias{IntradayVolatilityProfile} +\title{IntradayVolatilityProfile indicator} +\usage{ +IntradayVolatilityProfile(buckets, utc_offset_minutes) +} +\description{ +IntradayVolatilityProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/InverseFisherTransform.Rd b/bindings/r/man/InverseFisherTransform.Rd new file mode 100644 index 00000000..fe33c57a --- /dev/null +++ b/bindings/r/man/InverseFisherTransform.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InverseFisherTransform} +\alias{InverseFisherTransform} +\title{InverseFisherTransform indicator} +\usage{ +InverseFisherTransform(scale) +} +\description{ +InverseFisherTransform indicator +} +\keyword{internal} diff --git a/bindings/r/man/InvertedHammer.Rd b/bindings/r/man/InvertedHammer.Rd new file mode 100644 index 00000000..dc311966 --- /dev/null +++ b/bindings/r/man/InvertedHammer.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{InvertedHammer} +\alias{InvertedHammer} +\title{InvertedHammer indicator} +\usage{ +InvertedHammer() +} +\description{ +InvertedHammer indicator +} +\keyword{internal} diff --git a/bindings/r/man/JarqueBera.Rd b/bindings/r/man/JarqueBera.Rd new file mode 100644 index 00000000..36f90c51 --- /dev/null +++ b/bindings/r/man/JarqueBera.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{JarqueBera} +\alias{JarqueBera} +\title{JarqueBera indicator} +\usage{ +JarqueBera(period) +} +\description{ +JarqueBera indicator +} +\keyword{internal} diff --git a/bindings/r/man/Jma.Rd b/bindings/r/man/Jma.Rd new file mode 100644 index 00000000..a88a8998 --- /dev/null +++ b/bindings/r/man/Jma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Jma} +\alias{Jma} +\title{Jma indicator} +\usage{ +Jma(period, phase, power) +} +\description{ +Jma indicator +} +\keyword{internal} diff --git a/bindings/r/man/JumpIndicator.Rd b/bindings/r/man/JumpIndicator.Rd new file mode 100644 index 00000000..96a8cc72 --- /dev/null +++ b/bindings/r/man/JumpIndicator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{JumpIndicator} +\alias{JumpIndicator} +\title{JumpIndicator indicator} +\usage{ +JumpIndicator(period, threshold) +} +\description{ +JumpIndicator indicator +} +\keyword{internal} diff --git a/bindings/r/man/KRatio.Rd b/bindings/r/man/KRatio.Rd new file mode 100644 index 00000000..4b7b2b23 --- /dev/null +++ b/bindings/r/man/KRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KRatio} +\alias{KRatio} +\title{KRatio indicator} +\usage{ +KRatio(period) +} +\description{ +KRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/KagiBars.Rd b/bindings/r/man/KagiBars.Rd new file mode 100644 index 00000000..2832da07 --- /dev/null +++ b/bindings/r/man/KagiBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KagiBars} +\alias{KagiBars} +\title{KagiBars indicator} +\usage{ +KagiBars(reversal) +} +\description{ +KagiBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/KalmanHedgeRatio.Rd b/bindings/r/man/KalmanHedgeRatio.Rd new file mode 100644 index 00000000..666463ae --- /dev/null +++ b/bindings/r/man/KalmanHedgeRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KalmanHedgeRatio} +\alias{KalmanHedgeRatio} +\title{KalmanHedgeRatio indicator} +\usage{ +KalmanHedgeRatio(delta, observation_var) +} +\description{ +KalmanHedgeRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Kama.Rd b/bindings/r/man/Kama.Rd new file mode 100644 index 00000000..7382351c --- /dev/null +++ b/bindings/r/man/Kama.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Kama} +\alias{Kama} +\title{Kama indicator} +\usage{ +Kama(er_period, fast, slow) +} +\description{ +Kama indicator +} +\keyword{internal} diff --git a/bindings/r/man/KaseDevStop.Rd b/bindings/r/man/KaseDevStop.Rd new file mode 100644 index 00000000..228d0e20 --- /dev/null +++ b/bindings/r/man/KaseDevStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KaseDevStop} +\alias{KaseDevStop} +\title{KaseDevStop indicator} +\usage{ +KaseDevStop(period, dev) +} +\description{ +KaseDevStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/KasePermissionStochastic.Rd b/bindings/r/man/KasePermissionStochastic.Rd new file mode 100644 index 00000000..475d675c --- /dev/null +++ b/bindings/r/man/KasePermissionStochastic.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KasePermissionStochastic} +\alias{KasePermissionStochastic} +\title{KasePermissionStochastic indicator} +\usage{ +KasePermissionStochastic(length, smooth) +} +\description{ +KasePermissionStochastic indicator +} +\keyword{internal} diff --git a/bindings/r/man/KellyCriterion.Rd b/bindings/r/man/KellyCriterion.Rd new file mode 100644 index 00000000..04bca8d3 --- /dev/null +++ b/bindings/r/man/KellyCriterion.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KellyCriterion} +\alias{KellyCriterion} +\title{KellyCriterion indicator} +\usage{ +KellyCriterion(period) +} +\description{ +KellyCriterion indicator +} +\keyword{internal} diff --git a/bindings/r/man/Keltner.Rd b/bindings/r/man/Keltner.Rd new file mode 100644 index 00000000..d40d2030 --- /dev/null +++ b/bindings/r/man/Keltner.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Keltner} +\alias{Keltner} +\title{Keltner indicator} +\usage{ +Keltner(ema_period, atr_period, multiplier) +} +\description{ +Keltner indicator +} +\keyword{internal} diff --git a/bindings/r/man/KendallTau.Rd b/bindings/r/man/KendallTau.Rd new file mode 100644 index 00000000..ea399ff5 --- /dev/null +++ b/bindings/r/man/KendallTau.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KendallTau} +\alias{KendallTau} +\title{KendallTau indicator} +\usage{ +KendallTau(period) +} +\description{ +KendallTau indicator +} +\keyword{internal} diff --git a/bindings/r/man/Kicking.Rd b/bindings/r/man/Kicking.Rd new file mode 100644 index 00000000..a637ec90 --- /dev/null +++ b/bindings/r/man/Kicking.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Kicking} +\alias{Kicking} +\title{Kicking indicator} +\usage{ +Kicking() +} +\description{ +Kicking indicator +} +\keyword{internal} diff --git a/bindings/r/man/KickingByLength.Rd b/bindings/r/man/KickingByLength.Rd new file mode 100644 index 00000000..10d1675d --- /dev/null +++ b/bindings/r/man/KickingByLength.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KickingByLength} +\alias{KickingByLength} +\title{KickingByLength indicator} +\usage{ +KickingByLength() +} +\description{ +KickingByLength indicator +} +\keyword{internal} diff --git a/bindings/r/man/Kst.Rd b/bindings/r/man/Kst.Rd new file mode 100644 index 00000000..e9c055c0 --- /dev/null +++ b/bindings/r/man/Kst.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Kst} +\alias{Kst} +\title{Kst indicator} +\usage{ +Kst(roc1, roc2, roc3, roc4, sma1, sma2, sma3, sma4, signal) +} +\description{ +Kst indicator +} +\keyword{internal} diff --git a/bindings/r/man/Kurtosis.Rd b/bindings/r/man/Kurtosis.Rd new file mode 100644 index 00000000..ebed7501 --- /dev/null +++ b/bindings/r/man/Kurtosis.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Kurtosis} +\alias{Kurtosis} +\title{Kurtosis indicator} +\usage{ +Kurtosis(period) +} +\description{ +Kurtosis indicator +} +\keyword{internal} diff --git a/bindings/r/man/Kvo.Rd b/bindings/r/man/Kvo.Rd new file mode 100644 index 00000000..5256374d --- /dev/null +++ b/bindings/r/man/Kvo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Kvo} +\alias{Kvo} +\title{Kvo indicator} +\usage{ +Kvo(fast, slow) +} +\description{ +Kvo indicator +} +\keyword{internal} diff --git a/bindings/r/man/KylesLambda.Rd b/bindings/r/man/KylesLambda.Rd new file mode 100644 index 00000000..03838538 --- /dev/null +++ b/bindings/r/man/KylesLambda.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{KylesLambda} +\alias{KylesLambda} +\title{KylesLambda indicator} +\usage{ +KylesLambda(window) +} +\description{ +KylesLambda indicator +} +\keyword{internal} diff --git a/bindings/r/man/LadderBottom.Rd b/bindings/r/man/LadderBottom.Rd new file mode 100644 index 00000000..8c1c4e9b --- /dev/null +++ b/bindings/r/man/LadderBottom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LadderBottom} +\alias{LadderBottom} +\title{LadderBottom indicator} +\usage{ +LadderBottom() +} +\description{ +LadderBottom indicator +} +\keyword{internal} diff --git a/bindings/r/man/LaguerreRsi.Rd b/bindings/r/man/LaguerreRsi.Rd new file mode 100644 index 00000000..7d68a5bf --- /dev/null +++ b/bindings/r/man/LaguerreRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LaguerreRsi} +\alias{LaguerreRsi} +\title{LaguerreRsi indicator} +\usage{ +LaguerreRsi(gamma) +} +\description{ +LaguerreRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/LeadLagCrossCorrelation.Rd b/bindings/r/man/LeadLagCrossCorrelation.Rd new file mode 100644 index 00000000..e170c2ab --- /dev/null +++ b/bindings/r/man/LeadLagCrossCorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LeadLagCrossCorrelation} +\alias{LeadLagCrossCorrelation} +\title{LeadLagCrossCorrelation indicator} +\usage{ +LeadLagCrossCorrelation(window, max_lag) +} +\description{ +LeadLagCrossCorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/LinRegAngle.Rd b/bindings/r/man/LinRegAngle.Rd new file mode 100644 index 00000000..6b35b433 --- /dev/null +++ b/bindings/r/man/LinRegAngle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LinRegAngle} +\alias{LinRegAngle} +\title{LinRegAngle indicator} +\usage{ +LinRegAngle(period) +} +\description{ +LinRegAngle indicator +} +\keyword{internal} diff --git a/bindings/r/man/LinRegChannel.Rd b/bindings/r/man/LinRegChannel.Rd new file mode 100644 index 00000000..383cde61 --- /dev/null +++ b/bindings/r/man/LinRegChannel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LinRegChannel} +\alias{LinRegChannel} +\title{LinRegChannel indicator} +\usage{ +LinRegChannel(period, multiplier) +} +\description{ +LinRegChannel indicator +} +\keyword{internal} diff --git a/bindings/r/man/LinRegIntercept.Rd b/bindings/r/man/LinRegIntercept.Rd new file mode 100644 index 00000000..56545cb3 --- /dev/null +++ b/bindings/r/man/LinRegIntercept.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LinRegIntercept} +\alias{LinRegIntercept} +\title{LinRegIntercept indicator} +\usage{ +LinRegIntercept(period) +} +\description{ +LinRegIntercept indicator +} +\keyword{internal} diff --git a/bindings/r/man/LinRegSlope.Rd b/bindings/r/man/LinRegSlope.Rd new file mode 100644 index 00000000..57897e59 --- /dev/null +++ b/bindings/r/man/LinRegSlope.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LinRegSlope} +\alias{LinRegSlope} +\title{LinRegSlope indicator} +\usage{ +LinRegSlope(period) +} +\description{ +LinRegSlope indicator +} +\keyword{internal} diff --git a/bindings/r/man/LinearRegression.Rd b/bindings/r/man/LinearRegression.Rd new file mode 100644 index 00000000..a63b96fa --- /dev/null +++ b/bindings/r/man/LinearRegression.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LinearRegression} +\alias{LinearRegression} +\title{LinearRegression indicator} +\usage{ +LinearRegression(period) +} +\description{ +LinearRegression indicator +} +\keyword{internal} diff --git a/bindings/r/man/LiquidationFeatures.Rd b/bindings/r/man/LiquidationFeatures.Rd new file mode 100644 index 00000000..fec0aa77 --- /dev/null +++ b/bindings/r/man/LiquidationFeatures.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LiquidationFeatures} +\alias{LiquidationFeatures} +\title{LiquidationFeatures indicator} +\usage{ +LiquidationFeatures() +} +\description{ +LiquidationFeatures indicator +} +\keyword{internal} diff --git a/bindings/r/man/LogReturn.Rd b/bindings/r/man/LogReturn.Rd new file mode 100644 index 00000000..10d7c6d5 --- /dev/null +++ b/bindings/r/man/LogReturn.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LogReturn} +\alias{LogReturn} +\title{LogReturn indicator} +\usage{ +LogReturn(period) +} +\description{ +LogReturn indicator +} +\keyword{internal} diff --git a/bindings/r/man/LongLeggedDoji.Rd b/bindings/r/man/LongLeggedDoji.Rd new file mode 100644 index 00000000..0f396a9c --- /dev/null +++ b/bindings/r/man/LongLeggedDoji.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LongLeggedDoji} +\alias{LongLeggedDoji} +\title{LongLeggedDoji indicator} +\usage{ +LongLeggedDoji() +} +\description{ +LongLeggedDoji indicator +} +\keyword{internal} diff --git a/bindings/r/man/LongLine.Rd b/bindings/r/man/LongLine.Rd new file mode 100644 index 00000000..71ead095 --- /dev/null +++ b/bindings/r/man/LongLine.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LongLine} +\alias{LongLine} +\title{LongLine indicator} +\usage{ +LongLine() +} +\description{ +LongLine indicator +} +\keyword{internal} diff --git a/bindings/r/man/LongShortRatio.Rd b/bindings/r/man/LongShortRatio.Rd new file mode 100644 index 00000000..a637384f --- /dev/null +++ b/bindings/r/man/LongShortRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{LongShortRatio} +\alias{LongShortRatio} +\title{LongShortRatio indicator} +\usage{ +LongShortRatio() +} +\description{ +LongShortRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/M2Measure.Rd b/bindings/r/man/M2Measure.Rd new file mode 100644 index 00000000..9f76ed88 --- /dev/null +++ b/bindings/r/man/M2Measure.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{M2Measure} +\alias{M2Measure} +\title{M2Measure indicator} +\usage{ +M2Measure(period, risk_free, benchmark_stddev) +} +\description{ +M2Measure indicator +} +\keyword{internal} diff --git a/bindings/r/man/MaEnvelope.Rd b/bindings/r/man/MaEnvelope.Rd new file mode 100644 index 00000000..2c90bebc --- /dev/null +++ b/bindings/r/man/MaEnvelope.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MaEnvelope} +\alias{MaEnvelope} +\title{MaEnvelope indicator} +\usage{ +MaEnvelope(period, percent) +} +\description{ +MaEnvelope indicator +} +\keyword{internal} diff --git a/bindings/r/man/MacdExt.Rd b/bindings/r/man/MacdExt.Rd new file mode 100644 index 00000000..696e6d37 --- /dev/null +++ b/bindings/r/man/MacdExt.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MacdExt} +\alias{MacdExt} +\title{MacdExt indicator} +\usage{ +MacdExt(fast, fast_type, slow, slow_type, signal, signal_type) +} +\description{ +MacdExt indicator +} +\keyword{internal} diff --git a/bindings/r/man/MacdFix.Rd b/bindings/r/man/MacdFix.Rd new file mode 100644 index 00000000..5100831d --- /dev/null +++ b/bindings/r/man/MacdFix.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MacdFix} +\alias{MacdFix} +\title{MacdFix indicator} +\usage{ +MacdFix(signal) +} +\description{ +MacdFix indicator +} +\keyword{internal} diff --git a/bindings/r/man/MacdHistogram.Rd b/bindings/r/man/MacdHistogram.Rd new file mode 100644 index 00000000..1e1e69d1 --- /dev/null +++ b/bindings/r/man/MacdHistogram.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MacdHistogram} +\alias{MacdHistogram} +\title{MacdHistogram indicator} +\usage{ +MacdHistogram(fast, slow, signal) +} +\description{ +MacdHistogram indicator +} +\keyword{internal} diff --git a/bindings/r/man/MacdIndicator.Rd b/bindings/r/man/MacdIndicator.Rd new file mode 100644 index 00000000..cca6cb12 --- /dev/null +++ b/bindings/r/man/MacdIndicator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MacdIndicator} +\alias{MacdIndicator} +\title{MacdIndicator indicator} +\usage{ +MacdIndicator(fast, slow, signal) +} +\description{ +MacdIndicator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Mama.Rd b/bindings/r/man/Mama.Rd new file mode 100644 index 00000000..12428cf0 --- /dev/null +++ b/bindings/r/man/Mama.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Mama} +\alias{Mama} +\title{Mama indicator} +\usage{ +Mama(fast_limit, slow_limit) +} +\description{ +Mama indicator +} +\keyword{internal} diff --git a/bindings/r/man/MarketFacilitationIndex.Rd b/bindings/r/man/MarketFacilitationIndex.Rd new file mode 100644 index 00000000..0f6d0c96 --- /dev/null +++ b/bindings/r/man/MarketFacilitationIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MarketFacilitationIndex} +\alias{MarketFacilitationIndex} +\title{MarketFacilitationIndex indicator} +\usage{ +MarketFacilitationIndex() +} +\description{ +MarketFacilitationIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/MartinRatio.Rd b/bindings/r/man/MartinRatio.Rd new file mode 100644 index 00000000..a5cbc6b1 --- /dev/null +++ b/bindings/r/man/MartinRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MartinRatio} +\alias{MartinRatio} +\title{MartinRatio indicator} +\usage{ +MartinRatio(period) +} +\description{ +MartinRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Marubozu.Rd b/bindings/r/man/Marubozu.Rd new file mode 100644 index 00000000..e8a1124f --- /dev/null +++ b/bindings/r/man/Marubozu.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Marubozu} +\alias{Marubozu} +\title{Marubozu indicator} +\usage{ +Marubozu() +} +\description{ +Marubozu indicator +} +\keyword{internal} diff --git a/bindings/r/man/MassIndex.Rd b/bindings/r/man/MassIndex.Rd new file mode 100644 index 00000000..b71f32ba --- /dev/null +++ b/bindings/r/man/MassIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MassIndex} +\alias{MassIndex} +\title{MassIndex indicator} +\usage{ +MassIndex(ema_period, sum_period) +} +\description{ +MassIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/MatHold.Rd b/bindings/r/man/MatHold.Rd new file mode 100644 index 00000000..e9370afa --- /dev/null +++ b/bindings/r/man/MatHold.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MatHold} +\alias{MatHold} +\title{MatHold indicator} +\usage{ +MatHold() +} +\description{ +MatHold indicator +} +\keyword{internal} diff --git a/bindings/r/man/MatchingLow.Rd b/bindings/r/man/MatchingLow.Rd new file mode 100644 index 00000000..f3055825 --- /dev/null +++ b/bindings/r/man/MatchingLow.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MatchingLow} +\alias{MatchingLow} +\title{MatchingLow indicator} +\usage{ +MatchingLow() +} +\description{ +MatchingLow indicator +} +\keyword{internal} diff --git a/bindings/r/man/MaxDrawdown.Rd b/bindings/r/man/MaxDrawdown.Rd new file mode 100644 index 00000000..aae3b7ca --- /dev/null +++ b/bindings/r/man/MaxDrawdown.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MaxDrawdown} +\alias{MaxDrawdown} +\title{MaxDrawdown indicator} +\usage{ +MaxDrawdown(period) +} +\description{ +MaxDrawdown indicator +} +\keyword{internal} diff --git a/bindings/r/man/McClellanOscillator.Rd b/bindings/r/man/McClellanOscillator.Rd new file mode 100644 index 00000000..c0362931 --- /dev/null +++ b/bindings/r/man/McClellanOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{McClellanOscillator} +\alias{McClellanOscillator} +\title{McClellanOscillator indicator} +\usage{ +McClellanOscillator() +} +\description{ +McClellanOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/McClellanSummationIndex.Rd b/bindings/r/man/McClellanSummationIndex.Rd new file mode 100644 index 00000000..19799799 --- /dev/null +++ b/bindings/r/man/McClellanSummationIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{McClellanSummationIndex} +\alias{McClellanSummationIndex} +\title{McClellanSummationIndex indicator} +\usage{ +McClellanSummationIndex() +} +\description{ +McClellanSummationIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/McGinleyDynamic.Rd b/bindings/r/man/McGinleyDynamic.Rd new file mode 100644 index 00000000..0539b0b5 --- /dev/null +++ b/bindings/r/man/McGinleyDynamic.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{McGinleyDynamic} +\alias{McGinleyDynamic} +\title{McGinleyDynamic indicator} +\usage{ +McGinleyDynamic(period) +} +\description{ +McGinleyDynamic indicator +} +\keyword{internal} diff --git a/bindings/r/man/MedianAbsoluteDeviation.Rd b/bindings/r/man/MedianAbsoluteDeviation.Rd new file mode 100644 index 00000000..c424fe01 --- /dev/null +++ b/bindings/r/man/MedianAbsoluteDeviation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MedianAbsoluteDeviation} +\alias{MedianAbsoluteDeviation} +\title{MedianAbsoluteDeviation indicator} +\usage{ +MedianAbsoluteDeviation(period) +} +\description{ +MedianAbsoluteDeviation indicator +} +\keyword{internal} diff --git a/bindings/r/man/MedianChannel.Rd b/bindings/r/man/MedianChannel.Rd new file mode 100644 index 00000000..b94c48f3 --- /dev/null +++ b/bindings/r/man/MedianChannel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MedianChannel} +\alias{MedianChannel} +\title{MedianChannel indicator} +\usage{ +MedianChannel(period, multiplier) +} +\description{ +MedianChannel indicator +} +\keyword{internal} diff --git a/bindings/r/man/MedianMa.Rd b/bindings/r/man/MedianMa.Rd new file mode 100644 index 00000000..e67a64dc --- /dev/null +++ b/bindings/r/man/MedianMa.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MedianMa} +\alias{MedianMa} +\title{MedianMa indicator} +\usage{ +MedianMa(period) +} +\description{ +MedianMa indicator +} +\keyword{internal} diff --git a/bindings/r/man/MedianPrice.Rd b/bindings/r/man/MedianPrice.Rd new file mode 100644 index 00000000..84adc921 --- /dev/null +++ b/bindings/r/man/MedianPrice.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MedianPrice} +\alias{MedianPrice} +\title{MedianPrice indicator} +\usage{ +MedianPrice() +} +\description{ +MedianPrice indicator +} +\keyword{internal} diff --git a/bindings/r/man/Mfi.Rd b/bindings/r/man/Mfi.Rd new file mode 100644 index 00000000..8a676246 --- /dev/null +++ b/bindings/r/man/Mfi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Mfi} +\alias{Mfi} +\title{Mfi indicator} +\usage{ +Mfi(period) +} +\description{ +Mfi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Microprice.Rd b/bindings/r/man/Microprice.Rd new file mode 100644 index 00000000..93e9ca92 --- /dev/null +++ b/bindings/r/man/Microprice.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Microprice} +\alias{Microprice} +\title{Microprice indicator} +\usage{ +Microprice() +} +\description{ +Microprice indicator +} +\keyword{internal} diff --git a/bindings/r/man/MidPoint.Rd b/bindings/r/man/MidPoint.Rd new file mode 100644 index 00000000..05bb1d89 --- /dev/null +++ b/bindings/r/man/MidPoint.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MidPoint} +\alias{MidPoint} +\title{MidPoint indicator} +\usage{ +MidPoint(period) +} +\description{ +MidPoint indicator +} +\keyword{internal} diff --git a/bindings/r/man/MidPrice.Rd b/bindings/r/man/MidPrice.Rd new file mode 100644 index 00000000..1f28ccc5 --- /dev/null +++ b/bindings/r/man/MidPrice.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MidPrice} +\alias{MidPrice} +\title{MidPrice indicator} +\usage{ +MidPrice(period) +} +\description{ +MidPrice indicator +} +\keyword{internal} diff --git a/bindings/r/man/MinusDi.Rd b/bindings/r/man/MinusDi.Rd new file mode 100644 index 00000000..1db7a084 --- /dev/null +++ b/bindings/r/man/MinusDi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MinusDi} +\alias{MinusDi} +\title{MinusDi indicator} +\usage{ +MinusDi(period) +} +\description{ +MinusDi indicator +} +\keyword{internal} diff --git a/bindings/r/man/MinusDm.Rd b/bindings/r/man/MinusDm.Rd new file mode 100644 index 00000000..9fe5394f --- /dev/null +++ b/bindings/r/man/MinusDm.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MinusDm} +\alias{MinusDm} +\title{MinusDm indicator} +\usage{ +MinusDm(period) +} +\description{ +MinusDm indicator +} +\keyword{internal} diff --git a/bindings/r/man/ModifiedMaStop.Rd b/bindings/r/man/ModifiedMaStop.Rd new file mode 100644 index 00000000..d5c87a8a --- /dev/null +++ b/bindings/r/man/ModifiedMaStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ModifiedMaStop} +\alias{ModifiedMaStop} +\title{ModifiedMaStop indicator} +\usage{ +ModifiedMaStop(period) +} +\description{ +ModifiedMaStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/Mom.Rd b/bindings/r/man/Mom.Rd new file mode 100644 index 00000000..d9105f84 --- /dev/null +++ b/bindings/r/man/Mom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Mom} +\alias{Mom} +\title{Mom indicator} +\usage{ +Mom(period) +} +\description{ +Mom indicator +} +\keyword{internal} diff --git a/bindings/r/man/MorningDojiStar.Rd b/bindings/r/man/MorningDojiStar.Rd new file mode 100644 index 00000000..97396e6d --- /dev/null +++ b/bindings/r/man/MorningDojiStar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MorningDojiStar} +\alias{MorningDojiStar} +\title{MorningDojiStar indicator} +\usage{ +MorningDojiStar() +} +\description{ +MorningDojiStar indicator +} +\keyword{internal} diff --git a/bindings/r/man/MorningEveningStar.Rd b/bindings/r/man/MorningEveningStar.Rd new file mode 100644 index 00000000..f9678617 --- /dev/null +++ b/bindings/r/man/MorningEveningStar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MorningEveningStar} +\alias{MorningEveningStar} +\title{MorningEveningStar indicator} +\usage{ +MorningEveningStar() +} +\description{ +MorningEveningStar indicator +} +\keyword{internal} diff --git a/bindings/r/man/MurreyMathLines.Rd b/bindings/r/man/MurreyMathLines.Rd new file mode 100644 index 00000000..b3f1d261 --- /dev/null +++ b/bindings/r/man/MurreyMathLines.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{MurreyMathLines} +\alias{MurreyMathLines} +\title{MurreyMathLines indicator} +\usage{ +MurreyMathLines(period) +} +\description{ +MurreyMathLines indicator +} +\keyword{internal} diff --git a/bindings/r/man/NakedPoc.Rd b/bindings/r/man/NakedPoc.Rd new file mode 100644 index 00000000..2459f20d --- /dev/null +++ b/bindings/r/man/NakedPoc.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{NakedPoc} +\alias{NakedPoc} +\title{NakedPoc indicator} +\usage{ +NakedPoc(session_len, bins) +} +\description{ +NakedPoc indicator +} +\keyword{internal} diff --git a/bindings/r/man/Natr.Rd b/bindings/r/man/Natr.Rd new file mode 100644 index 00000000..30478ca0 --- /dev/null +++ b/bindings/r/man/Natr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Natr} +\alias{Natr} +\title{Natr indicator} +\usage{ +Natr(period) +} +\description{ +Natr indicator +} +\keyword{internal} diff --git a/bindings/r/man/NewHighsNewLows.Rd b/bindings/r/man/NewHighsNewLows.Rd new file mode 100644 index 00000000..7556ba1c --- /dev/null +++ b/bindings/r/man/NewHighsNewLows.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{NewHighsNewLows} +\alias{NewHighsNewLows} +\title{NewHighsNewLows indicator} +\usage{ +NewHighsNewLows() +} +\description{ +NewHighsNewLows indicator +} +\keyword{internal} diff --git a/bindings/r/man/NewPriceLines.Rd b/bindings/r/man/NewPriceLines.Rd new file mode 100644 index 00000000..eac59829 --- /dev/null +++ b/bindings/r/man/NewPriceLines.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{NewPriceLines} +\alias{NewPriceLines} +\title{NewPriceLines indicator} +\usage{ +NewPriceLines(count) +} +\description{ +NewPriceLines indicator +} +\keyword{internal} diff --git a/bindings/r/man/Nrtr.Rd b/bindings/r/man/Nrtr.Rd new file mode 100644 index 00000000..0e4e1efa --- /dev/null +++ b/bindings/r/man/Nrtr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Nrtr} +\alias{Nrtr} +\title{Nrtr indicator} +\usage{ +Nrtr(pct) +} +\description{ +Nrtr indicator +} +\keyword{internal} diff --git a/bindings/r/man/Nvi.Rd b/bindings/r/man/Nvi.Rd new file mode 100644 index 00000000..175bf3c9 --- /dev/null +++ b/bindings/r/man/Nvi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Nvi} +\alias{Nvi} +\title{Nvi indicator} +\usage{ +Nvi() +} +\description{ +Nvi indicator +} +\keyword{internal} diff --git a/bindings/r/man/OIPriceDivergence.Rd b/bindings/r/man/OIPriceDivergence.Rd new file mode 100644 index 00000000..66d9b5be --- /dev/null +++ b/bindings/r/man/OIPriceDivergence.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OIPriceDivergence} +\alias{OIPriceDivergence} +\title{OIPriceDivergence indicator} +\usage{ +OIPriceDivergence(window) +} +\description{ +OIPriceDivergence indicator +} +\keyword{internal} diff --git a/bindings/r/man/OIWeighted.Rd b/bindings/r/man/OIWeighted.Rd new file mode 100644 index 00000000..570d074f --- /dev/null +++ b/bindings/r/man/OIWeighted.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OIWeighted} +\alias{OIWeighted} +\title{OIWeighted indicator} +\usage{ +OIWeighted() +} +\description{ +OIWeighted indicator +} +\keyword{internal} diff --git a/bindings/r/man/Obv.Rd b/bindings/r/man/Obv.Rd new file mode 100644 index 00000000..e9bca2c8 --- /dev/null +++ b/bindings/r/man/Obv.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Obv} +\alias{Obv} +\title{Obv indicator} +\usage{ +Obv() +} +\description{ +Obv indicator +} +\keyword{internal} diff --git a/bindings/r/man/OiToVolumeRatio.Rd b/bindings/r/man/OiToVolumeRatio.Rd new file mode 100644 index 00000000..7127d684 --- /dev/null +++ b/bindings/r/man/OiToVolumeRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OiToVolumeRatio} +\alias{OiToVolumeRatio} +\title{OiToVolumeRatio indicator} +\usage{ +OiToVolumeRatio() +} +\description{ +OiToVolumeRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/OmegaRatio.Rd b/bindings/r/man/OmegaRatio.Rd new file mode 100644 index 00000000..b52d1808 --- /dev/null +++ b/bindings/r/man/OmegaRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OmegaRatio} +\alias{OmegaRatio} +\title{OmegaRatio indicator} +\usage{ +OmegaRatio(period, threshold) +} +\description{ +OmegaRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/OnNeck.Rd b/bindings/r/man/OnNeck.Rd new file mode 100644 index 00000000..6bafb295 --- /dev/null +++ b/bindings/r/man/OnNeck.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OnNeck} +\alias{OnNeck} +\title{OnNeck indicator} +\usage{ +OnNeck() +} +\description{ +OnNeck indicator +} +\keyword{internal} diff --git a/bindings/r/man/OpenInterestDelta.Rd b/bindings/r/man/OpenInterestDelta.Rd new file mode 100644 index 00000000..e71e0466 --- /dev/null +++ b/bindings/r/man/OpenInterestDelta.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OpenInterestDelta} +\alias{OpenInterestDelta} +\title{OpenInterestDelta indicator} +\usage{ +OpenInterestDelta() +} +\description{ +OpenInterestDelta indicator +} +\keyword{internal} diff --git a/bindings/r/man/OpenInterestMomentum.Rd b/bindings/r/man/OpenInterestMomentum.Rd new file mode 100644 index 00000000..8d19b6cd --- /dev/null +++ b/bindings/r/man/OpenInterestMomentum.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OpenInterestMomentum} +\alias{OpenInterestMomentum} +\title{OpenInterestMomentum indicator} +\usage{ +OpenInterestMomentum(period) +} +\description{ +OpenInterestMomentum indicator +} +\keyword{internal} diff --git a/bindings/r/man/OpeningMarubozu.Rd b/bindings/r/man/OpeningMarubozu.Rd new file mode 100644 index 00000000..52775459 --- /dev/null +++ b/bindings/r/man/OpeningMarubozu.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OpeningMarubozu} +\alias{OpeningMarubozu} +\title{OpeningMarubozu indicator} +\usage{ +OpeningMarubozu() +} +\description{ +OpeningMarubozu indicator +} +\keyword{internal} diff --git a/bindings/r/man/OpeningRange.Rd b/bindings/r/man/OpeningRange.Rd new file mode 100644 index 00000000..d72abe43 --- /dev/null +++ b/bindings/r/man/OpeningRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OpeningRange} +\alias{OpeningRange} +\title{OpeningRange indicator} +\usage{ +OpeningRange(period) +} +\description{ +OpeningRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/OrderBookImbalanceFull.Rd b/bindings/r/man/OrderBookImbalanceFull.Rd new file mode 100644 index 00000000..eb239cfa --- /dev/null +++ b/bindings/r/man/OrderBookImbalanceFull.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OrderBookImbalanceFull} +\alias{OrderBookImbalanceFull} +\title{OrderBookImbalanceFull indicator} +\usage{ +OrderBookImbalanceFull() +} +\description{ +OrderBookImbalanceFull indicator +} +\keyword{internal} diff --git a/bindings/r/man/OrderBookImbalanceTop1.Rd b/bindings/r/man/OrderBookImbalanceTop1.Rd new file mode 100644 index 00000000..a0e181b8 --- /dev/null +++ b/bindings/r/man/OrderBookImbalanceTop1.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OrderBookImbalanceTop1} +\alias{OrderBookImbalanceTop1} +\title{OrderBookImbalanceTop1 indicator} +\usage{ +OrderBookImbalanceTop1() +} +\description{ +OrderBookImbalanceTop1 indicator +} +\keyword{internal} diff --git a/bindings/r/man/OrderBookImbalanceTopN.Rd b/bindings/r/man/OrderBookImbalanceTopN.Rd new file mode 100644 index 00000000..ae6be4a2 --- /dev/null +++ b/bindings/r/man/OrderBookImbalanceTopN.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OrderBookImbalanceTopN} +\alias{OrderBookImbalanceTopN} +\title{OrderBookImbalanceTopN indicator} +\usage{ +OrderBookImbalanceTopN(levels) +} +\description{ +OrderBookImbalanceTopN indicator +} +\keyword{internal} diff --git a/bindings/r/man/OrderFlowImbalance.Rd b/bindings/r/man/OrderFlowImbalance.Rd new file mode 100644 index 00000000..f6922be2 --- /dev/null +++ b/bindings/r/man/OrderFlowImbalance.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OrderFlowImbalance} +\alias{OrderFlowImbalance} +\title{OrderFlowImbalance indicator} +\usage{ +OrderFlowImbalance(period) +} +\description{ +OrderFlowImbalance indicator +} +\keyword{internal} diff --git a/bindings/r/man/OuHalfLife.Rd b/bindings/r/man/OuHalfLife.Rd new file mode 100644 index 00000000..d531166b --- /dev/null +++ b/bindings/r/man/OuHalfLife.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OuHalfLife} +\alias{OuHalfLife} +\title{OuHalfLife indicator} +\usage{ +OuHalfLife(period) +} +\description{ +OuHalfLife indicator +} +\keyword{internal} diff --git a/bindings/r/man/OvernightGap.Rd b/bindings/r/man/OvernightGap.Rd new file mode 100644 index 00000000..41dae184 --- /dev/null +++ b/bindings/r/man/OvernightGap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OvernightGap} +\alias{OvernightGap} +\title{OvernightGap indicator} +\usage{ +OvernightGap(utc_offset_minutes) +} +\description{ +OvernightGap indicator +} +\keyword{internal} diff --git a/bindings/r/man/OvernightIntradayReturn.Rd b/bindings/r/man/OvernightIntradayReturn.Rd new file mode 100644 index 00000000..9ca8ecba --- /dev/null +++ b/bindings/r/man/OvernightIntradayReturn.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{OvernightIntradayReturn} +\alias{OvernightIntradayReturn} +\title{OvernightIntradayReturn indicator} +\usage{ +OvernightIntradayReturn(utc_offset_minutes) +} +\description{ +OvernightIntradayReturn indicator +} +\keyword{internal} diff --git a/bindings/r/man/PainIndex.Rd b/bindings/r/man/PainIndex.Rd new file mode 100644 index 00000000..81b5a168 --- /dev/null +++ b/bindings/r/man/PainIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PainIndex} +\alias{PainIndex} +\title{PainIndex indicator} +\usage{ +PainIndex(period) +} +\description{ +PainIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/PairSpreadZScore.Rd b/bindings/r/man/PairSpreadZScore.Rd new file mode 100644 index 00000000..cc4c52f2 --- /dev/null +++ b/bindings/r/man/PairSpreadZScore.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PairSpreadZScore} +\alias{PairSpreadZScore} +\title{PairSpreadZScore indicator} +\usage{ +PairSpreadZScore(beta_period, z_period) +} +\description{ +PairSpreadZScore indicator +} +\keyword{internal} diff --git a/bindings/r/man/PairwiseBeta.Rd b/bindings/r/man/PairwiseBeta.Rd new file mode 100644 index 00000000..f7c228aa --- /dev/null +++ b/bindings/r/man/PairwiseBeta.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PairwiseBeta} +\alias{PairwiseBeta} +\title{PairwiseBeta indicator} +\usage{ +PairwiseBeta(period) +} +\description{ +PairwiseBeta indicator +} +\keyword{internal} diff --git a/bindings/r/man/ParkinsonVolatility.Rd b/bindings/r/man/ParkinsonVolatility.Rd new file mode 100644 index 00000000..8b53512a --- /dev/null +++ b/bindings/r/man/ParkinsonVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ParkinsonVolatility} +\alias{ParkinsonVolatility} +\title{ParkinsonVolatility indicator} +\usage{ +ParkinsonVolatility(period, trading_periods) +} +\description{ +ParkinsonVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/PearsonCorrelation.Rd b/bindings/r/man/PearsonCorrelation.Rd new file mode 100644 index 00000000..9e41d2b2 --- /dev/null +++ b/bindings/r/man/PearsonCorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PearsonCorrelation} +\alias{PearsonCorrelation} +\title{PearsonCorrelation indicator} +\usage{ +PearsonCorrelation(period) +} +\description{ +PearsonCorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/PercentAboveMa.Rd b/bindings/r/man/PercentAboveMa.Rd new file mode 100644 index 00000000..27362364 --- /dev/null +++ b/bindings/r/man/PercentAboveMa.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PercentAboveMa} +\alias{PercentAboveMa} +\title{PercentAboveMa indicator} +\usage{ +PercentAboveMa() +} +\description{ +PercentAboveMa indicator +} +\keyword{internal} diff --git a/bindings/r/man/PercentB.Rd b/bindings/r/man/PercentB.Rd new file mode 100644 index 00000000..4a4232f7 --- /dev/null +++ b/bindings/r/man/PercentB.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PercentB} +\alias{PercentB} +\title{PercentB indicator} +\usage{ +PercentB(period, multiplier) +} +\description{ +PercentB indicator +} +\keyword{internal} diff --git a/bindings/r/man/PercentageTrailingStop.Rd b/bindings/r/man/PercentageTrailingStop.Rd new file mode 100644 index 00000000..545729cb --- /dev/null +++ b/bindings/r/man/PercentageTrailingStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PercentageTrailingStop} +\alias{PercentageTrailingStop} +\title{PercentageTrailingStop indicator} +\usage{ +PercentageTrailingStop(percent) +} +\description{ +PercentageTrailingStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/PerpetualPremiumIndex.Rd b/bindings/r/man/PerpetualPremiumIndex.Rd new file mode 100644 index 00000000..7b9e119e --- /dev/null +++ b/bindings/r/man/PerpetualPremiumIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PerpetualPremiumIndex} +\alias{PerpetualPremiumIndex} +\title{PerpetualPremiumIndex indicator} +\usage{ +PerpetualPremiumIndex() +} +\description{ +PerpetualPremiumIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/Pgo.Rd b/bindings/r/man/Pgo.Rd new file mode 100644 index 00000000..47f94aee --- /dev/null +++ b/bindings/r/man/Pgo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Pgo} +\alias{Pgo} +\title{Pgo indicator} +\usage{ +Pgo(period) +} +\description{ +Pgo indicator +} +\keyword{internal} diff --git a/bindings/r/man/PiercingDarkCloud.Rd b/bindings/r/man/PiercingDarkCloud.Rd new file mode 100644 index 00000000..1657ce50 --- /dev/null +++ b/bindings/r/man/PiercingDarkCloud.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PiercingDarkCloud} +\alias{PiercingDarkCloud} +\title{PiercingDarkCloud indicator} +\usage{ +PiercingDarkCloud() +} +\description{ +PiercingDarkCloud indicator +} +\keyword{internal} diff --git a/bindings/r/man/Pin.Rd b/bindings/r/man/Pin.Rd new file mode 100644 index 00000000..6e384334 --- /dev/null +++ b/bindings/r/man/Pin.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Pin} +\alias{Pin} +\title{Pin indicator} +\usage{ +Pin(window) +} +\description{ +Pin indicator +} +\keyword{internal} diff --git a/bindings/r/man/PivotReversal.Rd b/bindings/r/man/PivotReversal.Rd new file mode 100644 index 00000000..909be618 --- /dev/null +++ b/bindings/r/man/PivotReversal.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PivotReversal} +\alias{PivotReversal} +\title{PivotReversal indicator} +\usage{ +PivotReversal(left, right) +} +\description{ +PivotReversal indicator +} +\keyword{internal} diff --git a/bindings/r/man/PlusDi.Rd b/bindings/r/man/PlusDi.Rd new file mode 100644 index 00000000..10f85925 --- /dev/null +++ b/bindings/r/man/PlusDi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PlusDi} +\alias{PlusDi} +\title{PlusDi indicator} +\usage{ +PlusDi(period) +} +\description{ +PlusDi indicator +} +\keyword{internal} diff --git a/bindings/r/man/PlusDm.Rd b/bindings/r/man/PlusDm.Rd new file mode 100644 index 00000000..5c8dbe78 --- /dev/null +++ b/bindings/r/man/PlusDm.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PlusDm} +\alias{PlusDm} +\title{PlusDm indicator} +\usage{ +PlusDm(period) +} +\description{ +PlusDm indicator +} +\keyword{internal} diff --git a/bindings/r/man/Pmo.Rd b/bindings/r/man/Pmo.Rd new file mode 100644 index 00000000..7803639e --- /dev/null +++ b/bindings/r/man/Pmo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Pmo} +\alias{Pmo} +\title{Pmo indicator} +\usage{ +Pmo(smoothing1, smoothing2) +} +\description{ +Pmo indicator +} +\keyword{internal} diff --git a/bindings/r/man/PointAndFigureBars.Rd b/bindings/r/man/PointAndFigureBars.Rd new file mode 100644 index 00000000..283310b2 --- /dev/null +++ b/bindings/r/man/PointAndFigureBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PointAndFigureBars} +\alias{PointAndFigureBars} +\title{PointAndFigureBars indicator} +\usage{ +PointAndFigureBars(box_size, reversal) +} +\description{ +PointAndFigureBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/PolarizedFractalEfficiency.Rd b/bindings/r/man/PolarizedFractalEfficiency.Rd new file mode 100644 index 00000000..ea430e07 --- /dev/null +++ b/bindings/r/man/PolarizedFractalEfficiency.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PolarizedFractalEfficiency} +\alias{PolarizedFractalEfficiency} +\title{PolarizedFractalEfficiency indicator} +\usage{ +PolarizedFractalEfficiency(period, smoothing) +} +\description{ +PolarizedFractalEfficiency indicator +} +\keyword{internal} diff --git a/bindings/r/man/Ppo.Rd b/bindings/r/man/Ppo.Rd new file mode 100644 index 00000000..878cfb4a --- /dev/null +++ b/bindings/r/man/Ppo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Ppo} +\alias{Ppo} +\title{Ppo indicator} +\usage{ +Ppo(fast, slow) +} +\description{ +Ppo indicator +} +\keyword{internal} diff --git a/bindings/r/man/PpoHistogram.Rd b/bindings/r/man/PpoHistogram.Rd new file mode 100644 index 00000000..e5b60685 --- /dev/null +++ b/bindings/r/man/PpoHistogram.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{PpoHistogram} +\alias{PpoHistogram} +\title{PpoHistogram indicator} +\usage{ +PpoHistogram(fast, slow, signal) +} +\description{ +PpoHistogram indicator +} +\keyword{internal} diff --git a/bindings/r/man/ProfileShape.Rd b/bindings/r/man/ProfileShape.Rd new file mode 100644 index 00000000..e0095feb --- /dev/null +++ b/bindings/r/man/ProfileShape.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ProfileShape} +\alias{ProfileShape} +\title{ProfileShape indicator} +\usage{ +ProfileShape(period, bins) +} +\description{ +ProfileShape indicator +} +\keyword{internal} diff --git a/bindings/r/man/ProfitFactor.Rd b/bindings/r/man/ProfitFactor.Rd new file mode 100644 index 00000000..5d6dac72 --- /dev/null +++ b/bindings/r/man/ProfitFactor.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ProfitFactor} +\alias{ProfitFactor} +\title{ProfitFactor indicator} +\usage{ +ProfitFactor(period) +} +\description{ +ProfitFactor indicator +} +\keyword{internal} diff --git a/bindings/r/man/ProjectionBands.Rd b/bindings/r/man/ProjectionBands.Rd new file mode 100644 index 00000000..2b20b922 --- /dev/null +++ b/bindings/r/man/ProjectionBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ProjectionBands} +\alias{ProjectionBands} +\title{ProjectionBands indicator} +\usage{ +ProjectionBands(period) +} +\description{ +ProjectionBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/ProjectionOscillator.Rd b/bindings/r/man/ProjectionOscillator.Rd new file mode 100644 index 00000000..b8acd427 --- /dev/null +++ b/bindings/r/man/ProjectionOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ProjectionOscillator} +\alias{ProjectionOscillator} +\title{ProjectionOscillator indicator} +\usage{ +ProjectionOscillator(period) +} +\description{ +ProjectionOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Psar.Rd b/bindings/r/man/Psar.Rd new file mode 100644 index 00000000..7ce3fdf2 --- /dev/null +++ b/bindings/r/man/Psar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Psar} +\alias{Psar} +\title{Psar indicator} +\usage{ +Psar(af_start, af_step, af_max) +} +\description{ +Psar indicator +} +\keyword{internal} diff --git a/bindings/r/man/Pvi.Rd b/bindings/r/man/Pvi.Rd new file mode 100644 index 00000000..47db1692 --- /dev/null +++ b/bindings/r/man/Pvi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Pvi} +\alias{Pvi} +\title{Pvi indicator} +\usage{ +Pvi() +} +\description{ +Pvi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Qqe.Rd b/bindings/r/man/Qqe.Rd new file mode 100644 index 00000000..eeedaff2 --- /dev/null +++ b/bindings/r/man/Qqe.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Qqe} +\alias{Qqe} +\title{Qqe indicator} +\usage{ +Qqe(rsi_period, smoothing, factor) +} +\description{ +Qqe indicator +} +\keyword{internal} diff --git a/bindings/r/man/Qstick.Rd b/bindings/r/man/Qstick.Rd new file mode 100644 index 00000000..33ca18c9 --- /dev/null +++ b/bindings/r/man/Qstick.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Qstick} +\alias{Qstick} +\title{Qstick indicator} +\usage{ +Qstick(period) +} +\description{ +Qstick indicator +} +\keyword{internal} diff --git a/bindings/r/man/QuartileBands.Rd b/bindings/r/man/QuartileBands.Rd new file mode 100644 index 00000000..cacbb561 --- /dev/null +++ b/bindings/r/man/QuartileBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{QuartileBands} +\alias{QuartileBands} +\title{QuartileBands indicator} +\usage{ +QuartileBands(period) +} +\description{ +QuartileBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/QuotedSpread.Rd b/bindings/r/man/QuotedSpread.Rd new file mode 100644 index 00000000..ebd0acb5 --- /dev/null +++ b/bindings/r/man/QuotedSpread.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{QuotedSpread} +\alias{QuotedSpread} +\title{QuotedSpread indicator} +\usage{ +QuotedSpread() +} +\description{ +QuotedSpread indicator +} +\keyword{internal} diff --git a/bindings/r/man/RSquared.Rd b/bindings/r/man/RSquared.Rd new file mode 100644 index 00000000..eacb0ab7 --- /dev/null +++ b/bindings/r/man/RSquared.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RSquared} +\alias{RSquared} +\title{RSquared indicator} +\usage{ +RSquared(period) +} +\description{ +RSquared indicator +} +\keyword{internal} diff --git a/bindings/r/man/RangeBars.Rd b/bindings/r/man/RangeBars.Rd new file mode 100644 index 00000000..59e5791e --- /dev/null +++ b/bindings/r/man/RangeBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RangeBars} +\alias{RangeBars} +\title{RangeBars indicator} +\usage{ +RangeBars(range) +} +\description{ +RangeBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/RealizedSpread.Rd b/bindings/r/man/RealizedSpread.Rd new file mode 100644 index 00000000..af79e35a --- /dev/null +++ b/bindings/r/man/RealizedSpread.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RealizedSpread} +\alias{RealizedSpread} +\title{RealizedSpread indicator} +\usage{ +RealizedSpread(horizon) +} +\description{ +RealizedSpread indicator +} +\keyword{internal} diff --git a/bindings/r/man/RealizedVolatility.Rd b/bindings/r/man/RealizedVolatility.Rd new file mode 100644 index 00000000..94ddaa5c --- /dev/null +++ b/bindings/r/man/RealizedVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RealizedVolatility} +\alias{RealizedVolatility} +\title{RealizedVolatility indicator} +\usage{ +RealizedVolatility(period) +} +\description{ +RealizedVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/RecoveryFactor.Rd b/bindings/r/man/RecoveryFactor.Rd new file mode 100644 index 00000000..3a854966 --- /dev/null +++ b/bindings/r/man/RecoveryFactor.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RecoveryFactor} +\alias{RecoveryFactor} +\title{RecoveryFactor indicator} +\usage{ +RecoveryFactor() +} +\description{ +RecoveryFactor indicator +} +\keyword{internal} diff --git a/bindings/r/man/RectangleRange.Rd b/bindings/r/man/RectangleRange.Rd new file mode 100644 index 00000000..1cf75031 --- /dev/null +++ b/bindings/r/man/RectangleRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RectangleRange} +\alias{RectangleRange} +\title{RectangleRange indicator} +\usage{ +RectangleRange() +} +\description{ +RectangleRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/Reflex.Rd b/bindings/r/man/Reflex.Rd new file mode 100644 index 00000000..0e629229 --- /dev/null +++ b/bindings/r/man/Reflex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Reflex} +\alias{Reflex} +\title{Reflex indicator} +\usage{ +Reflex(period) +} +\description{ +Reflex indicator +} +\keyword{internal} diff --git a/bindings/r/man/RegimeLabel.Rd b/bindings/r/man/RegimeLabel.Rd new file mode 100644 index 00000000..377c21e1 --- /dev/null +++ b/bindings/r/man/RegimeLabel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RegimeLabel} +\alias{RegimeLabel} +\title{RegimeLabel indicator} +\usage{ +RegimeLabel(vol_period, lookback) +} +\description{ +RegimeLabel indicator +} +\keyword{internal} diff --git a/bindings/r/man/RelativeStrengthAB.Rd b/bindings/r/man/RelativeStrengthAB.Rd new file mode 100644 index 00000000..8b602d15 --- /dev/null +++ b/bindings/r/man/RelativeStrengthAB.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RelativeStrengthAB} +\alias{RelativeStrengthAB} +\title{RelativeStrengthAB indicator} +\usage{ +RelativeStrengthAB(ma_period, rsi_period) +} +\description{ +RelativeStrengthAB indicator +} +\keyword{internal} diff --git a/bindings/r/man/RenkoBars.Rd b/bindings/r/man/RenkoBars.Rd new file mode 100644 index 00000000..19529898 --- /dev/null +++ b/bindings/r/man/RenkoBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RenkoBars} +\alias{RenkoBars} +\title{RenkoBars indicator} +\usage{ +RenkoBars(box_size) +} +\description{ +RenkoBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/RenkoTrailingStop.Rd b/bindings/r/man/RenkoTrailingStop.Rd new file mode 100644 index 00000000..8da3f39a --- /dev/null +++ b/bindings/r/man/RenkoTrailingStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RenkoTrailingStop} +\alias{RenkoTrailingStop} +\title{RenkoTrailingStop indicator} +\usage{ +RenkoTrailingStop(block_size) +} +\description{ +RenkoTrailingStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/RickshawMan.Rd b/bindings/r/man/RickshawMan.Rd new file mode 100644 index 00000000..21175917 --- /dev/null +++ b/bindings/r/man/RickshawMan.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RickshawMan} +\alias{RickshawMan} +\title{RickshawMan indicator} +\usage{ +RickshawMan() +} +\description{ +RickshawMan indicator +} +\keyword{internal} diff --git a/bindings/r/man/RisingThreeMethods.Rd b/bindings/r/man/RisingThreeMethods.Rd new file mode 100644 index 00000000..3e4c955e --- /dev/null +++ b/bindings/r/man/RisingThreeMethods.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RisingThreeMethods} +\alias{RisingThreeMethods} +\title{RisingThreeMethods indicator} +\usage{ +RisingThreeMethods() +} +\description{ +RisingThreeMethods indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rmi.Rd b/bindings/r/man/Rmi.Rd new file mode 100644 index 00000000..93041b65 --- /dev/null +++ b/bindings/r/man/Rmi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rmi} +\alias{Rmi} +\title{Rmi indicator} +\usage{ +Rmi(period, momentum) +} +\description{ +Rmi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Roc.Rd b/bindings/r/man/Roc.Rd new file mode 100644 index 00000000..8894832c --- /dev/null +++ b/bindings/r/man/Roc.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Roc} +\alias{Roc} +\title{Roc indicator} +\usage{ +Roc(period) +} +\description{ +Roc indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rocp.Rd b/bindings/r/man/Rocp.Rd new file mode 100644 index 00000000..c47f606c --- /dev/null +++ b/bindings/r/man/Rocp.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rocp} +\alias{Rocp} +\title{Rocp indicator} +\usage{ +Rocp(period) +} +\description{ +Rocp indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rocr.Rd b/bindings/r/man/Rocr.Rd new file mode 100644 index 00000000..e8d5370a --- /dev/null +++ b/bindings/r/man/Rocr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rocr} +\alias{Rocr} +\title{Rocr indicator} +\usage{ +Rocr(period) +} +\description{ +Rocr indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rocr100.Rd b/bindings/r/man/Rocr100.Rd new file mode 100644 index 00000000..860fe450 --- /dev/null +++ b/bindings/r/man/Rocr100.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rocr100} +\alias{Rocr100} +\title{Rocr100 indicator} +\usage{ +Rocr100(period) +} +\description{ +Rocr100 indicator +} +\keyword{internal} diff --git a/bindings/r/man/RogersSatchellVolatility.Rd b/bindings/r/man/RogersSatchellVolatility.Rd new file mode 100644 index 00000000..655e1b30 --- /dev/null +++ b/bindings/r/man/RogersSatchellVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RogersSatchellVolatility} +\alias{RogersSatchellVolatility} +\title{RogersSatchellVolatility indicator} +\usage{ +RogersSatchellVolatility(period, trading_periods) +} +\description{ +RogersSatchellVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollMeasure.Rd b/bindings/r/man/RollMeasure.Rd new file mode 100644 index 00000000..6847b1da --- /dev/null +++ b/bindings/r/man/RollMeasure.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollMeasure} +\alias{RollMeasure} +\title{RollMeasure indicator} +\usage{ +RollMeasure(period) +} +\description{ +RollMeasure indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingCorrelation.Rd b/bindings/r/man/RollingCorrelation.Rd new file mode 100644 index 00000000..1057b35f --- /dev/null +++ b/bindings/r/man/RollingCorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingCorrelation} +\alias{RollingCorrelation} +\title{RollingCorrelation indicator} +\usage{ +RollingCorrelation(period) +} +\description{ +RollingCorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingCovariance.Rd b/bindings/r/man/RollingCovariance.Rd new file mode 100644 index 00000000..73df8989 --- /dev/null +++ b/bindings/r/man/RollingCovariance.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingCovariance} +\alias{RollingCovariance} +\title{RollingCovariance indicator} +\usage{ +RollingCovariance(period) +} +\description{ +RollingCovariance indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingIqr.Rd b/bindings/r/man/RollingIqr.Rd new file mode 100644 index 00000000..7113b8ba --- /dev/null +++ b/bindings/r/man/RollingIqr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingIqr} +\alias{RollingIqr} +\title{RollingIqr indicator} +\usage{ +RollingIqr(period) +} +\description{ +RollingIqr indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingMinMaxScaler.Rd b/bindings/r/man/RollingMinMaxScaler.Rd new file mode 100644 index 00000000..f7c138b1 --- /dev/null +++ b/bindings/r/man/RollingMinMaxScaler.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingMinMaxScaler} +\alias{RollingMinMaxScaler} +\title{RollingMinMaxScaler indicator} +\usage{ +RollingMinMaxScaler(period) +} +\description{ +RollingMinMaxScaler indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingPercentileRank.Rd b/bindings/r/man/RollingPercentileRank.Rd new file mode 100644 index 00000000..7065c488 --- /dev/null +++ b/bindings/r/man/RollingPercentileRank.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingPercentileRank} +\alias{RollingPercentileRank} +\title{RollingPercentileRank indicator} +\usage{ +RollingPercentileRank(period) +} +\description{ +RollingPercentileRank indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingQuantile.Rd b/bindings/r/man/RollingQuantile.Rd new file mode 100644 index 00000000..67340362 --- /dev/null +++ b/bindings/r/man/RollingQuantile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingQuantile} +\alias{RollingQuantile} +\title{RollingQuantile indicator} +\usage{ +RollingQuantile(period, quantile) +} +\description{ +RollingQuantile indicator +} +\keyword{internal} diff --git a/bindings/r/man/RollingVwap.Rd b/bindings/r/man/RollingVwap.Rd new file mode 100644 index 00000000..d8965103 --- /dev/null +++ b/bindings/r/man/RollingVwap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RollingVwap} +\alias{RollingVwap} +\title{RollingVwap indicator} +\usage{ +RollingVwap(period) +} +\description{ +RollingVwap indicator +} +\keyword{internal} diff --git a/bindings/r/man/RoofingFilter.Rd b/bindings/r/man/RoofingFilter.Rd new file mode 100644 index 00000000..ac99814a --- /dev/null +++ b/bindings/r/man/RoofingFilter.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RoofingFilter} +\alias{RoofingFilter} +\title{RoofingFilter indicator} +\usage{ +RoofingFilter(lp_period, hp_period) +} +\description{ +RoofingFilter indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rsi.Rd b/bindings/r/man/Rsi.Rd new file mode 100644 index 00000000..b15a9543 --- /dev/null +++ b/bindings/r/man/Rsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rsi} +\alias{Rsi} +\title{Rsi indicator} +\usage{ +Rsi(period) +} +\description{ +Rsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rsx.Rd b/bindings/r/man/Rsx.Rd new file mode 100644 index 00000000..c165c2a5 --- /dev/null +++ b/bindings/r/man/Rsx.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rsx} +\alias{Rsx} +\title{Rsx indicator} +\usage{ +Rsx(length) +} +\description{ +Rsx indicator +} +\keyword{internal} diff --git a/bindings/r/man/RunBars.Rd b/bindings/r/man/RunBars.Rd new file mode 100644 index 00000000..381729a1 --- /dev/null +++ b/bindings/r/man/RunBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RunBars} +\alias{RunBars} +\title{RunBars indicator} +\usage{ +RunBars(run_length) +} +\description{ +RunBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rvi.Rd b/bindings/r/man/Rvi.Rd new file mode 100644 index 00000000..eaa11e3d --- /dev/null +++ b/bindings/r/man/Rvi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rvi} +\alias{Rvi} +\title{Rvi indicator} +\usage{ +Rvi(period) +} +\description{ +Rvi indicator +} +\keyword{internal} diff --git a/bindings/r/man/RviVolatility.Rd b/bindings/r/man/RviVolatility.Rd new file mode 100644 index 00000000..00d3b58e --- /dev/null +++ b/bindings/r/man/RviVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{RviVolatility} +\alias{RviVolatility} +\title{RviVolatility indicator} +\usage{ +RviVolatility(period) +} +\description{ +RviVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/Rwi.Rd b/bindings/r/man/Rwi.Rd new file mode 100644 index 00000000..b2f0b1ef --- /dev/null +++ b/bindings/r/man/Rwi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Rwi} +\alias{Rwi} +\title{Rwi indicator} +\usage{ +Rwi(period) +} +\description{ +Rwi indicator +} +\keyword{internal} diff --git a/bindings/r/man/SampleEntropy.Rd b/bindings/r/man/SampleEntropy.Rd new file mode 100644 index 00000000..5b60e6c1 --- /dev/null +++ b/bindings/r/man/SampleEntropy.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SampleEntropy} +\alias{SampleEntropy} +\title{SampleEntropy indicator} +\usage{ +SampleEntropy(period, m, r_factor) +} +\description{ +SampleEntropy indicator +} +\keyword{internal} diff --git a/bindings/r/man/SarExt.Rd b/bindings/r/man/SarExt.Rd new file mode 100644 index 00000000..0e5c07dc --- /dev/null +++ b/bindings/r/man/SarExt.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SarExt} +\alias{SarExt} +\title{SarExt indicator} +\usage{ +SarExt( + start_value, + offset_on_reverse, + accel_init_long, + accel_long, + accel_max_long, + accel_init_short, + accel_short, + accel_max_short +) +} +\description{ +SarExt indicator +} +\keyword{internal} diff --git a/bindings/r/man/SeasonalZScore.Rd b/bindings/r/man/SeasonalZScore.Rd new file mode 100644 index 00000000..227d7cc5 --- /dev/null +++ b/bindings/r/man/SeasonalZScore.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SeasonalZScore} +\alias{SeasonalZScore} +\title{SeasonalZScore indicator} +\usage{ +SeasonalZScore(utc_offset_minutes) +} +\description{ +SeasonalZScore indicator +} +\keyword{internal} diff --git a/bindings/r/man/SeparatingLines.Rd b/bindings/r/man/SeparatingLines.Rd new file mode 100644 index 00000000..886ecf6c --- /dev/null +++ b/bindings/r/man/SeparatingLines.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SeparatingLines} +\alias{SeparatingLines} +\title{SeparatingLines indicator} +\usage{ +SeparatingLines() +} +\description{ +SeparatingLines indicator +} +\keyword{internal} diff --git a/bindings/r/man/SessionHighLow.Rd b/bindings/r/man/SessionHighLow.Rd new file mode 100644 index 00000000..4066fd4c --- /dev/null +++ b/bindings/r/man/SessionHighLow.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SessionHighLow} +\alias{SessionHighLow} +\title{SessionHighLow indicator} +\usage{ +SessionHighLow(utc_offset_minutes) +} +\description{ +SessionHighLow indicator +} +\keyword{internal} diff --git a/bindings/r/man/SessionRange.Rd b/bindings/r/man/SessionRange.Rd new file mode 100644 index 00000000..e22928ee --- /dev/null +++ b/bindings/r/man/SessionRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SessionRange} +\alias{SessionRange} +\title{SessionRange indicator} +\usage{ +SessionRange(utc_offset_minutes) +} +\description{ +SessionRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/SessionVwap.Rd b/bindings/r/man/SessionVwap.Rd new file mode 100644 index 00000000..d2a68370 --- /dev/null +++ b/bindings/r/man/SessionVwap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SessionVwap} +\alias{SessionVwap} +\title{SessionVwap indicator} +\usage{ +SessionVwap(utc_offset_minutes) +} +\description{ +SessionVwap indicator +} +\keyword{internal} diff --git a/bindings/r/man/ShannonEntropy.Rd b/bindings/r/man/ShannonEntropy.Rd new file mode 100644 index 00000000..958a9c69 --- /dev/null +++ b/bindings/r/man/ShannonEntropy.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ShannonEntropy} +\alias{ShannonEntropy} +\title{ShannonEntropy indicator} +\usage{ +ShannonEntropy(period, bins) +} +\description{ +ShannonEntropy indicator +} +\keyword{internal} diff --git a/bindings/r/man/Shark.Rd b/bindings/r/man/Shark.Rd new file mode 100644 index 00000000..b4033715 --- /dev/null +++ b/bindings/r/man/Shark.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Shark} +\alias{Shark} +\title{Shark indicator} +\usage{ +Shark() +} +\description{ +Shark indicator +} +\keyword{internal} diff --git a/bindings/r/man/SharpeRatio.Rd b/bindings/r/man/SharpeRatio.Rd new file mode 100644 index 00000000..ef2d8939 --- /dev/null +++ b/bindings/r/man/SharpeRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SharpeRatio} +\alias{SharpeRatio} +\title{SharpeRatio indicator} +\usage{ +SharpeRatio(period, risk_free) +} +\description{ +SharpeRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/ShootingStar.Rd b/bindings/r/man/ShootingStar.Rd new file mode 100644 index 00000000..6350d9d9 --- /dev/null +++ b/bindings/r/man/ShootingStar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ShootingStar} +\alias{ShootingStar} +\title{ShootingStar indicator} +\usage{ +ShootingStar() +} +\description{ +ShootingStar indicator +} +\keyword{internal} diff --git a/bindings/r/man/ShortLine.Rd b/bindings/r/man/ShortLine.Rd new file mode 100644 index 00000000..af04fdd4 --- /dev/null +++ b/bindings/r/man/ShortLine.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ShortLine} +\alias{ShortLine} +\title{ShortLine indicator} +\usage{ +ShortLine() +} +\description{ +ShortLine indicator +} +\keyword{internal} diff --git a/bindings/r/man/SignedVolume.Rd b/bindings/r/man/SignedVolume.Rd new file mode 100644 index 00000000..98042132 --- /dev/null +++ b/bindings/r/man/SignedVolume.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SignedVolume} +\alias{SignedVolume} +\title{SignedVolume indicator} +\usage{ +SignedVolume() +} +\description{ +SignedVolume indicator +} +\keyword{internal} diff --git a/bindings/r/man/SineWave.Rd b/bindings/r/man/SineWave.Rd new file mode 100644 index 00000000..d7b9a3aa --- /dev/null +++ b/bindings/r/man/SineWave.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SineWave} +\alias{SineWave} +\title{SineWave indicator} +\usage{ +SineWave() +} +\description{ +SineWave indicator +} +\keyword{internal} diff --git a/bindings/r/man/SineWeightedMa.Rd b/bindings/r/man/SineWeightedMa.Rd new file mode 100644 index 00000000..0959525d --- /dev/null +++ b/bindings/r/man/SineWeightedMa.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SineWeightedMa} +\alias{SineWeightedMa} +\title{SineWeightedMa indicator} +\usage{ +SineWeightedMa(period) +} +\description{ +SineWeightedMa indicator +} +\keyword{internal} diff --git a/bindings/r/man/SinglePrints.Rd b/bindings/r/man/SinglePrints.Rd new file mode 100644 index 00000000..6cd0687c --- /dev/null +++ b/bindings/r/man/SinglePrints.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SinglePrints} +\alias{SinglePrints} +\title{SinglePrints indicator} +\usage{ +SinglePrints(period, bins) +} +\description{ +SinglePrints indicator +} +\keyword{internal} diff --git a/bindings/r/man/Skewness.Rd b/bindings/r/man/Skewness.Rd new file mode 100644 index 00000000..507db0bb --- /dev/null +++ b/bindings/r/man/Skewness.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Skewness} +\alias{Skewness} +\title{Skewness indicator} +\usage{ +Skewness(period) +} +\description{ +Skewness indicator +} +\keyword{internal} diff --git a/bindings/r/man/Sma.Rd b/bindings/r/man/Sma.Rd new file mode 100644 index 00000000..0463f3c9 --- /dev/null +++ b/bindings/r/man/Sma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Sma} +\alias{Sma} +\title{Sma indicator} +\usage{ +Sma(period) +} +\description{ +Sma indicator +} +\keyword{internal} diff --git a/bindings/r/man/Smi.Rd b/bindings/r/man/Smi.Rd new file mode 100644 index 00000000..6cf50518 --- /dev/null +++ b/bindings/r/man/Smi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Smi} +\alias{Smi} +\title{Smi indicator} +\usage{ +Smi(period, d_period, d2_period) +} +\description{ +Smi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Smma.Rd b/bindings/r/man/Smma.Rd new file mode 100644 index 00000000..d23619b1 --- /dev/null +++ b/bindings/r/man/Smma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Smma} +\alias{Smma} +\title{Smma indicator} +\usage{ +Smma(period) +} +\description{ +Smma indicator +} +\keyword{internal} diff --git a/bindings/r/man/SmoothedHeikinAshi.Rd b/bindings/r/man/SmoothedHeikinAshi.Rd new file mode 100644 index 00000000..bfeaf29d --- /dev/null +++ b/bindings/r/man/SmoothedHeikinAshi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SmoothedHeikinAshi} +\alias{SmoothedHeikinAshi} +\title{SmoothedHeikinAshi indicator} +\usage{ +SmoothedHeikinAshi(period) +} +\description{ +SmoothedHeikinAshi indicator +} +\keyword{internal} diff --git a/bindings/r/man/SortinoRatio.Rd b/bindings/r/man/SortinoRatio.Rd new file mode 100644 index 00000000..b4efb936 --- /dev/null +++ b/bindings/r/man/SortinoRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SortinoRatio} +\alias{SortinoRatio} +\title{SortinoRatio indicator} +\usage{ +SortinoRatio(period, mar) +} +\description{ +SortinoRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/SpearmanCorrelation.Rd b/bindings/r/man/SpearmanCorrelation.Rd new file mode 100644 index 00000000..744b5204 --- /dev/null +++ b/bindings/r/man/SpearmanCorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SpearmanCorrelation} +\alias{SpearmanCorrelation} +\title{SpearmanCorrelation indicator} +\usage{ +SpearmanCorrelation(period) +} +\description{ +SpearmanCorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/SpinningTop.Rd b/bindings/r/man/SpinningTop.Rd new file mode 100644 index 00000000..3b2ac3bb --- /dev/null +++ b/bindings/r/man/SpinningTop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SpinningTop} +\alias{SpinningTop} +\title{SpinningTop indicator} +\usage{ +SpinningTop() +} +\description{ +SpinningTop indicator +} +\keyword{internal} diff --git a/bindings/r/man/SpreadAr1Coefficient.Rd b/bindings/r/man/SpreadAr1Coefficient.Rd new file mode 100644 index 00000000..57858633 --- /dev/null +++ b/bindings/r/man/SpreadAr1Coefficient.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SpreadAr1Coefficient} +\alias{SpreadAr1Coefficient} +\title{SpreadAr1Coefficient indicator} +\usage{ +SpreadAr1Coefficient(period) +} +\description{ +SpreadAr1Coefficient indicator +} +\keyword{internal} diff --git a/bindings/r/man/SpreadBollingerBands.Rd b/bindings/r/man/SpreadBollingerBands.Rd new file mode 100644 index 00000000..9d5de703 --- /dev/null +++ b/bindings/r/man/SpreadBollingerBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SpreadBollingerBands} +\alias{SpreadBollingerBands} +\title{SpreadBollingerBands indicator} +\usage{ +SpreadBollingerBands(period, num_std) +} +\description{ +SpreadBollingerBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/SpreadHurst.Rd b/bindings/r/man/SpreadHurst.Rd new file mode 100644 index 00000000..d907fece --- /dev/null +++ b/bindings/r/man/SpreadHurst.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SpreadHurst} +\alias{SpreadHurst} +\title{SpreadHurst indicator} +\usage{ +SpreadHurst(period) +} +\description{ +SpreadHurst indicator +} +\keyword{internal} diff --git a/bindings/r/man/StalledPattern.Rd b/bindings/r/man/StalledPattern.Rd new file mode 100644 index 00000000..0caf945d --- /dev/null +++ b/bindings/r/man/StalledPattern.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StalledPattern} +\alias{StalledPattern} +\title{StalledPattern indicator} +\usage{ +StalledPattern() +} +\description{ +StalledPattern indicator +} +\keyword{internal} diff --git a/bindings/r/man/StandardError.Rd b/bindings/r/man/StandardError.Rd new file mode 100644 index 00000000..99288049 --- /dev/null +++ b/bindings/r/man/StandardError.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StandardError} +\alias{StandardError} +\title{StandardError indicator} +\usage{ +StandardError(period) +} +\description{ +StandardError indicator +} +\keyword{internal} diff --git a/bindings/r/man/StandardErrorBands.Rd b/bindings/r/man/StandardErrorBands.Rd new file mode 100644 index 00000000..f7db5a86 --- /dev/null +++ b/bindings/r/man/StandardErrorBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StandardErrorBands} +\alias{StandardErrorBands} +\title{StandardErrorBands indicator} +\usage{ +StandardErrorBands(period, multiplier) +} +\description{ +StandardErrorBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/StarcBands.Rd b/bindings/r/man/StarcBands.Rd new file mode 100644 index 00000000..e4936594 --- /dev/null +++ b/bindings/r/man/StarcBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StarcBands} +\alias{StarcBands} +\title{StarcBands indicator} +\usage{ +StarcBands(sma_period, atr_period, multiplier) +} +\description{ +StarcBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/Stc.Rd b/bindings/r/man/Stc.Rd new file mode 100644 index 00000000..c3053255 --- /dev/null +++ b/bindings/r/man/Stc.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Stc} +\alias{Stc} +\title{Stc indicator} +\usage{ +Stc(fast, slow, schaff_period, factor) +} +\description{ +Stc indicator +} +\keyword{internal} diff --git a/bindings/r/man/StdDev.Rd b/bindings/r/man/StdDev.Rd new file mode 100644 index 00000000..1252a0c4 --- /dev/null +++ b/bindings/r/man/StdDev.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StdDev} +\alias{StdDev} +\title{StdDev indicator} +\usage{ +StdDev(period) +} +\description{ +StdDev indicator +} +\keyword{internal} diff --git a/bindings/r/man/StepTrailingStop.Rd b/bindings/r/man/StepTrailingStop.Rd new file mode 100644 index 00000000..5abe9214 --- /dev/null +++ b/bindings/r/man/StepTrailingStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StepTrailingStop} +\alias{StepTrailingStop} +\title{StepTrailingStop indicator} +\usage{ +StepTrailingStop(step_size) +} +\description{ +StepTrailingStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/SterlingRatio.Rd b/bindings/r/man/SterlingRatio.Rd new file mode 100644 index 00000000..194eec3f --- /dev/null +++ b/bindings/r/man/SterlingRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SterlingRatio} +\alias{SterlingRatio} +\title{SterlingRatio indicator} +\usage{ +SterlingRatio(period) +} +\description{ +SterlingRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/StickSandwich.Rd b/bindings/r/man/StickSandwich.Rd new file mode 100644 index 00000000..dd7c6a1e --- /dev/null +++ b/bindings/r/man/StickSandwich.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StickSandwich} +\alias{StickSandwich} +\title{StickSandwich indicator} +\usage{ +StickSandwich() +} +\description{ +StickSandwich indicator +} +\keyword{internal} diff --git a/bindings/r/man/StochRsi.Rd b/bindings/r/man/StochRsi.Rd new file mode 100644 index 00000000..a9dd41c3 --- /dev/null +++ b/bindings/r/man/StochRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StochRsi} +\alias{StochRsi} +\title{StochRsi indicator} +\usage{ +StochRsi(rsi_period, stoch_period) +} +\description{ +StochRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Stochastic.Rd b/bindings/r/man/Stochastic.Rd new file mode 100644 index 00000000..f8095b7d --- /dev/null +++ b/bindings/r/man/Stochastic.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Stochastic} +\alias{Stochastic} +\title{Stochastic indicator} +\usage{ +Stochastic(k_period, d_period) +} +\description{ +Stochastic indicator +} +\keyword{internal} diff --git a/bindings/r/man/StochasticCci.Rd b/bindings/r/man/StochasticCci.Rd new file mode 100644 index 00000000..b936aa8b --- /dev/null +++ b/bindings/r/man/StochasticCci.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{StochasticCci} +\alias{StochasticCci} +\title{StochasticCci indicator} +\usage{ +StochasticCci(period) +} +\description{ +StochasticCci indicator +} +\keyword{internal} diff --git a/bindings/r/man/SuperSmoother.Rd b/bindings/r/man/SuperSmoother.Rd new file mode 100644 index 00000000..7f55dc3e --- /dev/null +++ b/bindings/r/man/SuperSmoother.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SuperSmoother} +\alias{SuperSmoother} +\title{SuperSmoother indicator} +\usage{ +SuperSmoother(period) +} +\description{ +SuperSmoother indicator +} +\keyword{internal} diff --git a/bindings/r/man/SuperTrend.Rd b/bindings/r/man/SuperTrend.Rd new file mode 100644 index 00000000..f24eb67c --- /dev/null +++ b/bindings/r/man/SuperTrend.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{SuperTrend} +\alias{SuperTrend} +\title{SuperTrend indicator} +\usage{ +SuperTrend(atr_period, multiplier) +} +\description{ +SuperTrend indicator +} +\keyword{internal} diff --git a/bindings/r/man/T3.Rd b/bindings/r/man/T3.Rd new file mode 100644 index 00000000..fd22127a --- /dev/null +++ b/bindings/r/man/T3.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{T3} +\alias{T3} +\title{T3 indicator} +\usage{ +T3(period, v) +} +\description{ +T3 indicator +} +\keyword{internal} diff --git a/bindings/r/man/TailRatio.Rd b/bindings/r/man/TailRatio.Rd new file mode 100644 index 00000000..9bd33ff6 --- /dev/null +++ b/bindings/r/man/TailRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TailRatio} +\alias{TailRatio} +\title{TailRatio indicator} +\usage{ +TailRatio(period) +} +\description{ +TailRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/TakerBuySellRatio.Rd b/bindings/r/man/TakerBuySellRatio.Rd new file mode 100644 index 00000000..d2d8df9f --- /dev/null +++ b/bindings/r/man/TakerBuySellRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TakerBuySellRatio} +\alias{TakerBuySellRatio} +\title{TakerBuySellRatio indicator} +\usage{ +TakerBuySellRatio() +} +\description{ +TakerBuySellRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Takuri.Rd b/bindings/r/man/Takuri.Rd new file mode 100644 index 00000000..4e8128e2 --- /dev/null +++ b/bindings/r/man/Takuri.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Takuri} +\alias{Takuri} +\title{Takuri indicator} +\usage{ +Takuri() +} +\description{ +Takuri indicator +} +\keyword{internal} diff --git a/bindings/r/man/TasukiGap.Rd b/bindings/r/man/TasukiGap.Rd new file mode 100644 index 00000000..8a1be7ce --- /dev/null +++ b/bindings/r/man/TasukiGap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TasukiGap} +\alias{TasukiGap} +\title{TasukiGap indicator} +\usage{ +TasukiGap() +} +\description{ +TasukiGap indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdCamouflage.Rd b/bindings/r/man/TdCamouflage.Rd new file mode 100644 index 00000000..d1df5b6e --- /dev/null +++ b/bindings/r/man/TdCamouflage.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdCamouflage} +\alias{TdCamouflage} +\title{TdCamouflage indicator} +\usage{ +TdCamouflage() +} +\description{ +TdCamouflage indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdClop.Rd b/bindings/r/man/TdClop.Rd new file mode 100644 index 00000000..3e9d319e --- /dev/null +++ b/bindings/r/man/TdClop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdClop} +\alias{TdClop} +\title{TdClop indicator} +\usage{ +TdClop() +} +\description{ +TdClop indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdClopwin.Rd b/bindings/r/man/TdClopwin.Rd new file mode 100644 index 00000000..262c18a2 --- /dev/null +++ b/bindings/r/man/TdClopwin.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdClopwin} +\alias{TdClopwin} +\title{TdClopwin indicator} +\usage{ +TdClopwin() +} +\description{ +TdClopwin indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdCombo.Rd b/bindings/r/man/TdCombo.Rd new file mode 100644 index 00000000..47131e87 --- /dev/null +++ b/bindings/r/man/TdCombo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdCombo} +\alias{TdCombo} +\title{TdCombo indicator} +\usage{ +TdCombo(setup_lookback, setup_target, countdown_lookback, countdown_target) +} +\description{ +TdCombo indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdCountdown.Rd b/bindings/r/man/TdCountdown.Rd new file mode 100644 index 00000000..52c33472 --- /dev/null +++ b/bindings/r/man/TdCountdown.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdCountdown} +\alias{TdCountdown} +\title{TdCountdown indicator} +\usage{ +TdCountdown(setup_lookback, setup_target, countdown_lookback, countdown_target) +} +\description{ +TdCountdown indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdDWave.Rd b/bindings/r/man/TdDWave.Rd new file mode 100644 index 00000000..e0f602bd --- /dev/null +++ b/bindings/r/man/TdDWave.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdDWave} +\alias{TdDWave} +\title{TdDWave indicator} +\usage{ +TdDWave(strength) +} +\description{ +TdDWave indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdDeMarker.Rd b/bindings/r/man/TdDeMarker.Rd new file mode 100644 index 00000000..8c4015a9 --- /dev/null +++ b/bindings/r/man/TdDeMarker.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdDeMarker} +\alias{TdDeMarker} +\title{TdDeMarker indicator} +\usage{ +TdDeMarker(period) +} +\description{ +TdDeMarker indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdDifferential.Rd b/bindings/r/man/TdDifferential.Rd new file mode 100644 index 00000000..e9689fc2 --- /dev/null +++ b/bindings/r/man/TdDifferential.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdDifferential} +\alias{TdDifferential} +\title{TdDifferential indicator} +\usage{ +TdDifferential() +} +\description{ +TdDifferential indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdLines.Rd b/bindings/r/man/TdLines.Rd new file mode 100644 index 00000000..73fc9587 --- /dev/null +++ b/bindings/r/man/TdLines.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdLines} +\alias{TdLines} +\title{TdLines indicator} +\usage{ +TdLines(lookback, target) +} +\description{ +TdLines indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdMovingAverage.Rd b/bindings/r/man/TdMovingAverage.Rd new file mode 100644 index 00000000..592eb929 --- /dev/null +++ b/bindings/r/man/TdMovingAverage.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdMovingAverage} +\alias{TdMovingAverage} +\title{TdMovingAverage indicator} +\usage{ +TdMovingAverage(period_st1, period_st2) +} +\description{ +TdMovingAverage indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdOpen.Rd b/bindings/r/man/TdOpen.Rd new file mode 100644 index 00000000..9fc0db73 --- /dev/null +++ b/bindings/r/man/TdOpen.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdOpen} +\alias{TdOpen} +\title{TdOpen indicator} +\usage{ +TdOpen() +} +\description{ +TdOpen indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdPressure.Rd b/bindings/r/man/TdPressure.Rd new file mode 100644 index 00000000..a8237174 --- /dev/null +++ b/bindings/r/man/TdPressure.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdPressure} +\alias{TdPressure} +\title{TdPressure indicator} +\usage{ +TdPressure(period) +} +\description{ +TdPressure indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdPropulsion.Rd b/bindings/r/man/TdPropulsion.Rd new file mode 100644 index 00000000..b625f8f0 --- /dev/null +++ b/bindings/r/man/TdPropulsion.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdPropulsion} +\alias{TdPropulsion} +\title{TdPropulsion indicator} +\usage{ +TdPropulsion() +} +\description{ +TdPropulsion indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdRangeProjection.Rd b/bindings/r/man/TdRangeProjection.Rd new file mode 100644 index 00000000..af44bc39 --- /dev/null +++ b/bindings/r/man/TdRangeProjection.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdRangeProjection} +\alias{TdRangeProjection} +\title{TdRangeProjection indicator} +\usage{ +TdRangeProjection() +} +\description{ +TdRangeProjection indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdRei.Rd b/bindings/r/man/TdRei.Rd new file mode 100644 index 00000000..198644c8 --- /dev/null +++ b/bindings/r/man/TdRei.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdRei} +\alias{TdRei} +\title{TdRei indicator} +\usage{ +TdRei(period) +} +\description{ +TdRei indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdRiskLevel.Rd b/bindings/r/man/TdRiskLevel.Rd new file mode 100644 index 00000000..4f9d7623 --- /dev/null +++ b/bindings/r/man/TdRiskLevel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdRiskLevel} +\alias{TdRiskLevel} +\title{TdRiskLevel indicator} +\usage{ +TdRiskLevel(lookback, target) +} +\description{ +TdRiskLevel indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdSequential.Rd b/bindings/r/man/TdSequential.Rd new file mode 100644 index 00000000..e70681a1 --- /dev/null +++ b/bindings/r/man/TdSequential.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdSequential} +\alias{TdSequential} +\title{TdSequential indicator} +\usage{ +TdSequential( + setup_lookback, + setup_target, + countdown_lookback, + countdown_target +) +} +\description{ +TdSequential indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdSetup.Rd b/bindings/r/man/TdSetup.Rd new file mode 100644 index 00000000..2b3c6078 --- /dev/null +++ b/bindings/r/man/TdSetup.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdSetup} +\alias{TdSetup} +\title{TdSetup indicator} +\usage{ +TdSetup(lookback, target) +} +\description{ +TdSetup indicator +} +\keyword{internal} diff --git a/bindings/r/man/TdTrap.Rd b/bindings/r/man/TdTrap.Rd new file mode 100644 index 00000000..a03374df --- /dev/null +++ b/bindings/r/man/TdTrap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TdTrap} +\alias{TdTrap} +\title{TdTrap indicator} +\usage{ +TdTrap() +} +\description{ +TdTrap indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tema.Rd b/bindings/r/man/Tema.Rd new file mode 100644 index 00000000..8ea7a274 --- /dev/null +++ b/bindings/r/man/Tema.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tema} +\alias{Tema} +\title{Tema indicator} +\usage{ +Tema(period) +} +\description{ +Tema indicator +} +\keyword{internal} diff --git a/bindings/r/man/TermStructureBasis.Rd b/bindings/r/man/TermStructureBasis.Rd new file mode 100644 index 00000000..198b127b --- /dev/null +++ b/bindings/r/man/TermStructureBasis.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TermStructureBasis} +\alias{TermStructureBasis} +\title{TermStructureBasis indicator} +\usage{ +TermStructureBasis() +} +\description{ +TermStructureBasis indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeDrives.Rd b/bindings/r/man/ThreeDrives.Rd new file mode 100644 index 00000000..3b4f10c0 --- /dev/null +++ b/bindings/r/man/ThreeDrives.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeDrives} +\alias{ThreeDrives} +\title{ThreeDrives indicator} +\usage{ +ThreeDrives() +} +\description{ +ThreeDrives indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeInside.Rd b/bindings/r/man/ThreeInside.Rd new file mode 100644 index 00000000..c972551a --- /dev/null +++ b/bindings/r/man/ThreeInside.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeInside} +\alias{ThreeInside} +\title{ThreeInside indicator} +\usage{ +ThreeInside() +} +\description{ +ThreeInside indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeLineBreak.Rd b/bindings/r/man/ThreeLineBreak.Rd new file mode 100644 index 00000000..7025984d --- /dev/null +++ b/bindings/r/man/ThreeLineBreak.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeLineBreak} +\alias{ThreeLineBreak} +\title{ThreeLineBreak indicator} +\usage{ +ThreeLineBreak(lines) +} +\description{ +ThreeLineBreak indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeLineBreakBars.Rd b/bindings/r/man/ThreeLineBreakBars.Rd new file mode 100644 index 00000000..e4e4f025 --- /dev/null +++ b/bindings/r/man/ThreeLineBreakBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeLineBreakBars} +\alias{ThreeLineBreakBars} +\title{ThreeLineBreakBars indicator} +\usage{ +ThreeLineBreakBars(lines) +} +\description{ +ThreeLineBreakBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeLineStrike.Rd b/bindings/r/man/ThreeLineStrike.Rd new file mode 100644 index 00000000..9fc63d55 --- /dev/null +++ b/bindings/r/man/ThreeLineStrike.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeLineStrike} +\alias{ThreeLineStrike} +\title{ThreeLineStrike indicator} +\usage{ +ThreeLineStrike() +} +\description{ +ThreeLineStrike indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeOutside.Rd b/bindings/r/man/ThreeOutside.Rd new file mode 100644 index 00000000..ed73e90f --- /dev/null +++ b/bindings/r/man/ThreeOutside.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeOutside} +\alias{ThreeOutside} +\title{ThreeOutside indicator} +\usage{ +ThreeOutside() +} +\description{ +ThreeOutside indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeSoldiersOrCrows.Rd b/bindings/r/man/ThreeSoldiersOrCrows.Rd new file mode 100644 index 00000000..25ed4589 --- /dev/null +++ b/bindings/r/man/ThreeSoldiersOrCrows.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeSoldiersOrCrows} +\alias{ThreeSoldiersOrCrows} +\title{ThreeSoldiersOrCrows indicator} +\usage{ +ThreeSoldiersOrCrows() +} +\description{ +ThreeSoldiersOrCrows indicator +} +\keyword{internal} diff --git a/bindings/r/man/ThreeStarsInSouth.Rd b/bindings/r/man/ThreeStarsInSouth.Rd new file mode 100644 index 00000000..764c1517 --- /dev/null +++ b/bindings/r/man/ThreeStarsInSouth.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ThreeStarsInSouth} +\alias{ThreeStarsInSouth} +\title{ThreeStarsInSouth indicator} +\usage{ +ThreeStarsInSouth() +} +\description{ +ThreeStarsInSouth indicator +} +\keyword{internal} diff --git a/bindings/r/man/Thrusting.Rd b/bindings/r/man/Thrusting.Rd new file mode 100644 index 00000000..29416e2c --- /dev/null +++ b/bindings/r/man/Thrusting.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Thrusting} +\alias{Thrusting} +\title{Thrusting indicator} +\usage{ +Thrusting() +} +\description{ +Thrusting indicator +} +\keyword{internal} diff --git a/bindings/r/man/TickBars.Rd b/bindings/r/man/TickBars.Rd new file mode 100644 index 00000000..39f3458d --- /dev/null +++ b/bindings/r/man/TickBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TickBars} +\alias{TickBars} +\title{TickBars indicator} +\usage{ +TickBars(ticks) +} +\description{ +TickBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/TickIndex.Rd b/bindings/r/man/TickIndex.Rd new file mode 100644 index 00000000..0bf8dde4 --- /dev/null +++ b/bindings/r/man/TickIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TickIndex} +\alias{TickIndex} +\title{TickIndex indicator} +\usage{ +TickIndex() +} +\description{ +TickIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tii.Rd b/bindings/r/man/Tii.Rd new file mode 100644 index 00000000..040ad618 --- /dev/null +++ b/bindings/r/man/Tii.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tii} +\alias{Tii} +\title{Tii indicator} +\usage{ +Tii(sma_period, dev_period) +} +\description{ +Tii indicator +} +\keyword{internal} diff --git a/bindings/r/man/TimeBasedStop.Rd b/bindings/r/man/TimeBasedStop.Rd new file mode 100644 index 00000000..e3f82176 --- /dev/null +++ b/bindings/r/man/TimeBasedStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TimeBasedStop} +\alias{TimeBasedStop} +\title{TimeBasedStop indicator} +\usage{ +TimeBasedStop(max_bars) +} +\description{ +TimeBasedStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/TimeOfDayReturnProfile.Rd b/bindings/r/man/TimeOfDayReturnProfile.Rd new file mode 100644 index 00000000..e4d68fe3 --- /dev/null +++ b/bindings/r/man/TimeOfDayReturnProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TimeOfDayReturnProfile} +\alias{TimeOfDayReturnProfile} +\title{TimeOfDayReturnProfile indicator} +\usage{ +TimeOfDayReturnProfile(buckets, utc_offset_minutes) +} +\description{ +TimeOfDayReturnProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/TowerTopBottom.Rd b/bindings/r/man/TowerTopBottom.Rd new file mode 100644 index 00000000..66309935 --- /dev/null +++ b/bindings/r/man/TowerTopBottom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TowerTopBottom} +\alias{TowerTopBottom} +\title{TowerTopBottom indicator} +\usage{ +TowerTopBottom() +} +\description{ +TowerTopBottom indicator +} +\keyword{internal} diff --git a/bindings/r/man/TpoProfile.Rd b/bindings/r/man/TpoProfile.Rd new file mode 100644 index 00000000..0710bbc9 --- /dev/null +++ b/bindings/r/man/TpoProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TpoProfile} +\alias{TpoProfile} +\title{TpoProfile indicator} +\usage{ +TpoProfile(period, bin_count) +} +\description{ +TpoProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/TradeImbalance.Rd b/bindings/r/man/TradeImbalance.Rd new file mode 100644 index 00000000..e8260442 --- /dev/null +++ b/bindings/r/man/TradeImbalance.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TradeImbalance} +\alias{TradeImbalance} +\title{TradeImbalance indicator} +\usage{ +TradeImbalance(window) +} +\description{ +TradeImbalance indicator +} +\keyword{internal} diff --git a/bindings/r/man/TradeSignAutocorrelation.Rd b/bindings/r/man/TradeSignAutocorrelation.Rd new file mode 100644 index 00000000..ceb7afae --- /dev/null +++ b/bindings/r/man/TradeSignAutocorrelation.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TradeSignAutocorrelation} +\alias{TradeSignAutocorrelation} +\title{TradeSignAutocorrelation indicator} +\usage{ +TradeSignAutocorrelation(period) +} +\description{ +TradeSignAutocorrelation indicator +} +\keyword{internal} diff --git a/bindings/r/man/TradeVolumeIndex.Rd b/bindings/r/man/TradeVolumeIndex.Rd new file mode 100644 index 00000000..ef5ef2d3 --- /dev/null +++ b/bindings/r/man/TradeVolumeIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TradeVolumeIndex} +\alias{TradeVolumeIndex} +\title{TradeVolumeIndex indicator} +\usage{ +TradeVolumeIndex(min_tick) +} +\description{ +TradeVolumeIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/TrendLabel.Rd b/bindings/r/man/TrendLabel.Rd new file mode 100644 index 00000000..2a04fc3c --- /dev/null +++ b/bindings/r/man/TrendLabel.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TrendLabel} +\alias{TrendLabel} +\title{TrendLabel indicator} +\usage{ +TrendLabel(period) +} +\description{ +TrendLabel indicator +} +\keyword{internal} diff --git a/bindings/r/man/TrendStrengthIndex.Rd b/bindings/r/man/TrendStrengthIndex.Rd new file mode 100644 index 00000000..70c6c363 --- /dev/null +++ b/bindings/r/man/TrendStrengthIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TrendStrengthIndex} +\alias{TrendStrengthIndex} +\title{TrendStrengthIndex indicator} +\usage{ +TrendStrengthIndex(period) +} +\description{ +TrendStrengthIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/Trendflex.Rd b/bindings/r/man/Trendflex.Rd new file mode 100644 index 00000000..ec30f792 --- /dev/null +++ b/bindings/r/man/Trendflex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Trendflex} +\alias{Trendflex} +\title{Trendflex indicator} +\usage{ +Trendflex(period) +} +\description{ +Trendflex indicator +} +\keyword{internal} diff --git a/bindings/r/man/TreynorRatio.Rd b/bindings/r/man/TreynorRatio.Rd new file mode 100644 index 00000000..768256a6 --- /dev/null +++ b/bindings/r/man/TreynorRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TreynorRatio} +\alias{TreynorRatio} +\title{TreynorRatio indicator} +\usage{ +TreynorRatio(period, risk_free) +} +\description{ +TreynorRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/Triangle.Rd b/bindings/r/man/Triangle.Rd new file mode 100644 index 00000000..d880a9a3 --- /dev/null +++ b/bindings/r/man/Triangle.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Triangle} +\alias{Triangle} +\title{Triangle indicator} +\usage{ +Triangle() +} +\description{ +Triangle indicator +} +\keyword{internal} diff --git a/bindings/r/man/Trima.Rd b/bindings/r/man/Trima.Rd new file mode 100644 index 00000000..e74b15fe --- /dev/null +++ b/bindings/r/man/Trima.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Trima} +\alias{Trima} +\title{Trima indicator} +\usage{ +Trima(period) +} +\description{ +Trima indicator +} +\keyword{internal} diff --git a/bindings/r/man/Trin.Rd b/bindings/r/man/Trin.Rd new file mode 100644 index 00000000..2b36aca0 --- /dev/null +++ b/bindings/r/man/Trin.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Trin} +\alias{Trin} +\title{Trin indicator} +\usage{ +Trin() +} +\description{ +Trin indicator +} +\keyword{internal} diff --git a/bindings/r/man/TripleTopBottom.Rd b/bindings/r/man/TripleTopBottom.Rd new file mode 100644 index 00000000..a01109b5 --- /dev/null +++ b/bindings/r/man/TripleTopBottom.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TripleTopBottom} +\alias{TripleTopBottom} +\title{TripleTopBottom indicator} +\usage{ +TripleTopBottom() +} +\description{ +TripleTopBottom indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tristar.Rd b/bindings/r/man/Tristar.Rd new file mode 100644 index 00000000..372f892f --- /dev/null +++ b/bindings/r/man/Tristar.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tristar} +\alias{Tristar} +\title{Tristar indicator} +\usage{ +Tristar() +} +\description{ +Tristar indicator +} +\keyword{internal} diff --git a/bindings/r/man/Trix.Rd b/bindings/r/man/Trix.Rd new file mode 100644 index 00000000..9ff92209 --- /dev/null +++ b/bindings/r/man/Trix.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Trix} +\alias{Trix} +\title{Trix indicator} +\usage{ +Trix(period) +} +\description{ +Trix indicator +} +\keyword{internal} diff --git a/bindings/r/man/TrueRange.Rd b/bindings/r/man/TrueRange.Rd new file mode 100644 index 00000000..e7fc5c98 --- /dev/null +++ b/bindings/r/man/TrueRange.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TrueRange} +\alias{TrueRange} +\title{TrueRange indicator} +\usage{ +TrueRange() +} +\description{ +TrueRange indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tsf.Rd b/bindings/r/man/Tsf.Rd new file mode 100644 index 00000000..74bcf233 --- /dev/null +++ b/bindings/r/man/Tsf.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tsf} +\alias{Tsf} +\title{Tsf indicator} +\usage{ +Tsf(period) +} +\description{ +Tsf indicator +} +\keyword{internal} diff --git a/bindings/r/man/TsfOscillator.Rd b/bindings/r/man/TsfOscillator.Rd new file mode 100644 index 00000000..7faa34d0 --- /dev/null +++ b/bindings/r/man/TsfOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TsfOscillator} +\alias{TsfOscillator} +\title{TsfOscillator indicator} +\usage{ +TsfOscillator(period) +} +\description{ +TsfOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tsi.Rd b/bindings/r/man/Tsi.Rd new file mode 100644 index 00000000..fd4baa6a --- /dev/null +++ b/bindings/r/man/Tsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tsi} +\alias{Tsi} +\title{Tsi indicator} +\usage{ +Tsi(long_, short_) +} +\description{ +Tsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tsv.Rd b/bindings/r/man/Tsv.Rd new file mode 100644 index 00000000..c0fa5030 --- /dev/null +++ b/bindings/r/man/Tsv.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tsv} +\alias{Tsv} +\title{Tsv indicator} +\usage{ +Tsv(period) +} +\description{ +Tsv indicator +} +\keyword{internal} diff --git a/bindings/r/man/TtmSqueeze.Rd b/bindings/r/man/TtmSqueeze.Rd new file mode 100644 index 00000000..f1febeb2 --- /dev/null +++ b/bindings/r/man/TtmSqueeze.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TtmSqueeze} +\alias{TtmSqueeze} +\title{TtmSqueeze indicator} +\usage{ +TtmSqueeze(period, bb_mult, kc_mult) +} +\description{ +TtmSqueeze indicator +} +\keyword{internal} diff --git a/bindings/r/man/TtmTrend.Rd b/bindings/r/man/TtmTrend.Rd new file mode 100644 index 00000000..d2c15992 --- /dev/null +++ b/bindings/r/man/TtmTrend.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TtmTrend} +\alias{TtmTrend} +\title{TtmTrend indicator} +\usage{ +TtmTrend(period) +} +\description{ +TtmTrend indicator +} +\keyword{internal} diff --git a/bindings/r/man/TurnOfMonth.Rd b/bindings/r/man/TurnOfMonth.Rd new file mode 100644 index 00000000..5e85d4ab --- /dev/null +++ b/bindings/r/man/TurnOfMonth.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TurnOfMonth} +\alias{TurnOfMonth} +\title{TurnOfMonth indicator} +\usage{ +TurnOfMonth(n_first, n_last, utc_offset_minutes) +} +\description{ +TurnOfMonth indicator +} +\keyword{internal} diff --git a/bindings/r/man/Tweezer.Rd b/bindings/r/man/Tweezer.Rd new file mode 100644 index 00000000..a8ddceb1 --- /dev/null +++ b/bindings/r/man/Tweezer.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Tweezer} +\alias{Tweezer} +\title{Tweezer indicator} +\usage{ +Tweezer() +} +\description{ +Tweezer indicator +} +\keyword{internal} diff --git a/bindings/r/man/TwiggsMoneyFlow.Rd b/bindings/r/man/TwiggsMoneyFlow.Rd new file mode 100644 index 00000000..26f5c558 --- /dev/null +++ b/bindings/r/man/TwiggsMoneyFlow.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TwiggsMoneyFlow} +\alias{TwiggsMoneyFlow} +\title{TwiggsMoneyFlow indicator} +\usage{ +TwiggsMoneyFlow(period) +} +\description{ +TwiggsMoneyFlow indicator +} +\keyword{internal} diff --git a/bindings/r/man/TwoCrows.Rd b/bindings/r/man/TwoCrows.Rd new file mode 100644 index 00000000..8efaf026 --- /dev/null +++ b/bindings/r/man/TwoCrows.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TwoCrows} +\alias{TwoCrows} +\title{TwoCrows indicator} +\usage{ +TwoCrows() +} +\description{ +TwoCrows indicator +} +\keyword{internal} diff --git a/bindings/r/man/TypicalPrice.Rd b/bindings/r/man/TypicalPrice.Rd new file mode 100644 index 00000000..d2e62eeb --- /dev/null +++ b/bindings/r/man/TypicalPrice.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{TypicalPrice} +\alias{TypicalPrice} +\title{TypicalPrice indicator} +\usage{ +TypicalPrice() +} +\description{ +TypicalPrice indicator +} +\keyword{internal} diff --git a/bindings/r/man/UlcerIndex.Rd b/bindings/r/man/UlcerIndex.Rd new file mode 100644 index 00000000..da7a8050 --- /dev/null +++ b/bindings/r/man/UlcerIndex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UlcerIndex} +\alias{UlcerIndex} +\title{UlcerIndex indicator} +\usage{ +UlcerIndex(period) +} +\description{ +UlcerIndex indicator +} +\keyword{internal} diff --git a/bindings/r/man/UltimateOscillator.Rd b/bindings/r/man/UltimateOscillator.Rd new file mode 100644 index 00000000..6a84c2d2 --- /dev/null +++ b/bindings/r/man/UltimateOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UltimateOscillator} +\alias{UltimateOscillator} +\title{UltimateOscillator indicator} +\usage{ +UltimateOscillator(short_, mid, long_) +} +\description{ +UltimateOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/UniqueThreeRiver.Rd b/bindings/r/man/UniqueThreeRiver.Rd new file mode 100644 index 00000000..54aa7cc1 --- /dev/null +++ b/bindings/r/man/UniqueThreeRiver.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UniqueThreeRiver} +\alias{UniqueThreeRiver} +\title{UniqueThreeRiver indicator} +\usage{ +UniqueThreeRiver() +} +\description{ +UniqueThreeRiver indicator +} +\keyword{internal} diff --git a/bindings/r/man/UniversalOscillator.Rd b/bindings/r/man/UniversalOscillator.Rd new file mode 100644 index 00000000..9697de6f --- /dev/null +++ b/bindings/r/man/UniversalOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UniversalOscillator} +\alias{UniversalOscillator} +\title{UniversalOscillator indicator} +\usage{ +UniversalOscillator(period) +} +\description{ +UniversalOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/UpDownVolumeRatio.Rd b/bindings/r/man/UpDownVolumeRatio.Rd new file mode 100644 index 00000000..3f5ddb49 --- /dev/null +++ b/bindings/r/man/UpDownVolumeRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UpDownVolumeRatio} +\alias{UpDownVolumeRatio} +\title{UpDownVolumeRatio indicator} +\usage{ +UpDownVolumeRatio() +} +\description{ +UpDownVolumeRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/UpsideGapThreeMethods.Rd b/bindings/r/man/UpsideGapThreeMethods.Rd new file mode 100644 index 00000000..20029016 --- /dev/null +++ b/bindings/r/man/UpsideGapThreeMethods.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UpsideGapThreeMethods} +\alias{UpsideGapThreeMethods} +\title{UpsideGapThreeMethods indicator} +\usage{ +UpsideGapThreeMethods() +} +\description{ +UpsideGapThreeMethods indicator +} +\keyword{internal} diff --git a/bindings/r/man/UpsideGapTwoCrows.Rd b/bindings/r/man/UpsideGapTwoCrows.Rd new file mode 100644 index 00000000..f7a655ed --- /dev/null +++ b/bindings/r/man/UpsideGapTwoCrows.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UpsideGapTwoCrows} +\alias{UpsideGapTwoCrows} +\title{UpsideGapTwoCrows indicator} +\usage{ +UpsideGapTwoCrows() +} +\description{ +UpsideGapTwoCrows indicator +} +\keyword{internal} diff --git a/bindings/r/man/UpsidePotentialRatio.Rd b/bindings/r/man/UpsidePotentialRatio.Rd new file mode 100644 index 00000000..a74e5e0b --- /dev/null +++ b/bindings/r/man/UpsidePotentialRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{UpsidePotentialRatio} +\alias{UpsidePotentialRatio} +\title{UpsidePotentialRatio indicator} +\usage{ +UpsidePotentialRatio(period, mar) +} +\description{ +UpsidePotentialRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/ValueArea.Rd b/bindings/r/man/ValueArea.Rd new file mode 100644 index 00000000..93ee7eb8 --- /dev/null +++ b/bindings/r/man/ValueArea.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ValueArea} +\alias{ValueArea} +\title{ValueArea indicator} +\usage{ +ValueArea(period, bin_count, value_area_pct) +} +\description{ +ValueArea indicator +} +\keyword{internal} diff --git a/bindings/r/man/ValueAtRisk.Rd b/bindings/r/man/ValueAtRisk.Rd new file mode 100644 index 00000000..8b93d799 --- /dev/null +++ b/bindings/r/man/ValueAtRisk.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ValueAtRisk} +\alias{ValueAtRisk} +\title{ValueAtRisk indicator} +\usage{ +ValueAtRisk(period, confidence) +} +\description{ +ValueAtRisk indicator +} +\keyword{internal} diff --git a/bindings/r/man/Variance.Rd b/bindings/r/man/Variance.Rd new file mode 100644 index 00000000..5d52de09 --- /dev/null +++ b/bindings/r/man/Variance.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Variance} +\alias{Variance} +\title{Variance indicator} +\usage{ +Variance(period) +} +\description{ +Variance indicator +} +\keyword{internal} diff --git a/bindings/r/man/VarianceRatio.Rd b/bindings/r/man/VarianceRatio.Rd new file mode 100644 index 00000000..3a423f26 --- /dev/null +++ b/bindings/r/man/VarianceRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VarianceRatio} +\alias{VarianceRatio} +\title{VarianceRatio indicator} +\usage{ +VarianceRatio(period, q) +} +\description{ +VarianceRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/VerticalHorizontalFilter.Rd b/bindings/r/man/VerticalHorizontalFilter.Rd new file mode 100644 index 00000000..9fd12564 --- /dev/null +++ b/bindings/r/man/VerticalHorizontalFilter.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VerticalHorizontalFilter} +\alias{VerticalHorizontalFilter} +\title{VerticalHorizontalFilter indicator} +\usage{ +VerticalHorizontalFilter(period) +} +\description{ +VerticalHorizontalFilter indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vidya.Rd b/bindings/r/man/Vidya.Rd new file mode 100644 index 00000000..d23d4373 --- /dev/null +++ b/bindings/r/man/Vidya.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vidya} +\alias{Vidya} +\title{Vidya indicator} +\usage{ +Vidya(period, cmo_period) +} +\description{ +Vidya indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolatilityCone.Rd b/bindings/r/man/VolatilityCone.Rd new file mode 100644 index 00000000..2ae805b1 --- /dev/null +++ b/bindings/r/man/VolatilityCone.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolatilityCone} +\alias{VolatilityCone} +\title{VolatilityCone indicator} +\usage{ +VolatilityCone(window, lookback) +} +\description{ +VolatilityCone indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolatilityOfVolatility.Rd b/bindings/r/man/VolatilityOfVolatility.Rd new file mode 100644 index 00000000..26985430 --- /dev/null +++ b/bindings/r/man/VolatilityOfVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolatilityOfVolatility} +\alias{VolatilityOfVolatility} +\title{VolatilityOfVolatility indicator} +\usage{ +VolatilityOfVolatility(vol_window, vov_window) +} +\description{ +VolatilityOfVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolatilityRatio.Rd b/bindings/r/man/VolatilityRatio.Rd new file mode 100644 index 00000000..f4330d34 --- /dev/null +++ b/bindings/r/man/VolatilityRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolatilityRatio} +\alias{VolatilityRatio} +\title{VolatilityRatio indicator} +\usage{ +VolatilityRatio(period) +} +\description{ +VolatilityRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/VoltyStop.Rd b/bindings/r/man/VoltyStop.Rd new file mode 100644 index 00000000..5dedfce5 --- /dev/null +++ b/bindings/r/man/VoltyStop.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VoltyStop} +\alias{VoltyStop} +\title{VoltyStop indicator} +\usage{ +VoltyStop(atr_period, multiplier) +} +\description{ +VoltyStop indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeBars.Rd b/bindings/r/man/VolumeBars.Rd new file mode 100644 index 00000000..2a671a88 --- /dev/null +++ b/bindings/r/man/VolumeBars.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeBars} +\alias{VolumeBars} +\title{VolumeBars indicator} +\usage{ +VolumeBars(volume_per_bar) +} +\description{ +VolumeBars indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeByTimeProfile.Rd b/bindings/r/man/VolumeByTimeProfile.Rd new file mode 100644 index 00000000..3c9229e5 --- /dev/null +++ b/bindings/r/man/VolumeByTimeProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeByTimeProfile} +\alias{VolumeByTimeProfile} +\title{VolumeByTimeProfile indicator} +\usage{ +VolumeByTimeProfile(buckets, utc_offset_minutes) +} +\description{ +VolumeByTimeProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeOscillator.Rd b/bindings/r/man/VolumeOscillator.Rd new file mode 100644 index 00000000..96236fca --- /dev/null +++ b/bindings/r/man/VolumeOscillator.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeOscillator} +\alias{VolumeOscillator} +\title{VolumeOscillator indicator} +\usage{ +VolumeOscillator(fast, slow) +} +\description{ +VolumeOscillator indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumePriceTrend.Rd b/bindings/r/man/VolumePriceTrend.Rd new file mode 100644 index 00000000..f1bd3e18 --- /dev/null +++ b/bindings/r/man/VolumePriceTrend.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumePriceTrend} +\alias{VolumePriceTrend} +\title{VolumePriceTrend indicator} +\usage{ +VolumePriceTrend() +} +\description{ +VolumePriceTrend indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeProfile.Rd b/bindings/r/man/VolumeProfile.Rd new file mode 100644 index 00000000..d9793e84 --- /dev/null +++ b/bindings/r/man/VolumeProfile.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeProfile} +\alias{VolumeProfile} +\title{VolumeProfile indicator} +\usage{ +VolumeProfile(period, bin_count) +} +\description{ +VolumeProfile indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeRsi.Rd b/bindings/r/man/VolumeRsi.Rd new file mode 100644 index 00000000..54eeff29 --- /dev/null +++ b/bindings/r/man/VolumeRsi.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeRsi} +\alias{VolumeRsi} +\title{VolumeRsi indicator} +\usage{ +VolumeRsi(period) +} +\description{ +VolumeRsi indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeWeightedMacd.Rd b/bindings/r/man/VolumeWeightedMacd.Rd new file mode 100644 index 00000000..6ce193b3 --- /dev/null +++ b/bindings/r/man/VolumeWeightedMacd.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeWeightedMacd} +\alias{VolumeWeightedMacd} +\title{VolumeWeightedMacd indicator} +\usage{ +VolumeWeightedMacd(fast, slow, signal) +} +\description{ +VolumeWeightedMacd indicator +} +\keyword{internal} diff --git a/bindings/r/man/VolumeWeightedSr.Rd b/bindings/r/man/VolumeWeightedSr.Rd new file mode 100644 index 00000000..4be00630 --- /dev/null +++ b/bindings/r/man/VolumeWeightedSr.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VolumeWeightedSr} +\alias{VolumeWeightedSr} +\title{VolumeWeightedSr indicator} +\usage{ +VolumeWeightedSr(period) +} +\description{ +VolumeWeightedSr indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vortex.Rd b/bindings/r/man/Vortex.Rd new file mode 100644 index 00000000..3ba878e0 --- /dev/null +++ b/bindings/r/man/Vortex.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vortex} +\alias{Vortex} +\title{Vortex indicator} +\usage{ +Vortex(period) +} +\description{ +Vortex indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vpin.Rd b/bindings/r/man/Vpin.Rd new file mode 100644 index 00000000..67b2fea1 --- /dev/null +++ b/bindings/r/man/Vpin.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vpin} +\alias{Vpin} +\title{Vpin indicator} +\usage{ +Vpin(bucket_volume, num_buckets) +} +\description{ +Vpin indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vwap.Rd b/bindings/r/man/Vwap.Rd new file mode 100644 index 00000000..163f290a --- /dev/null +++ b/bindings/r/man/Vwap.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vwap} +\alias{Vwap} +\title{Vwap indicator} +\usage{ +Vwap() +} +\description{ +Vwap indicator +} +\keyword{internal} diff --git a/bindings/r/man/VwapStdDevBands.Rd b/bindings/r/man/VwapStdDevBands.Rd new file mode 100644 index 00000000..cb6ce9c4 --- /dev/null +++ b/bindings/r/man/VwapStdDevBands.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{VwapStdDevBands} +\alias{VwapStdDevBands} +\title{VwapStdDevBands indicator} +\usage{ +VwapStdDevBands(multiplier) +} +\description{ +VwapStdDevBands indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vwma.Rd b/bindings/r/man/Vwma.Rd new file mode 100644 index 00000000..e810a46b --- /dev/null +++ b/bindings/r/man/Vwma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vwma} +\alias{Vwma} +\title{Vwma indicator} +\usage{ +Vwma(period) +} +\description{ +Vwma indicator +} +\keyword{internal} diff --git a/bindings/r/man/Vzo.Rd b/bindings/r/man/Vzo.Rd new file mode 100644 index 00000000..70c9c6be --- /dev/null +++ b/bindings/r/man/Vzo.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Vzo} +\alias{Vzo} +\title{Vzo indicator} +\usage{ +Vzo(period) +} +\description{ +Vzo indicator +} +\keyword{internal} diff --git a/bindings/r/man/Wad.Rd b/bindings/r/man/Wad.Rd new file mode 100644 index 00000000..209c0ec6 --- /dev/null +++ b/bindings/r/man/Wad.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Wad} +\alias{Wad} +\title{Wad indicator} +\usage{ +Wad() +} +\description{ +Wad indicator +} +\keyword{internal} diff --git a/bindings/r/man/WavePm.Rd b/bindings/r/man/WavePm.Rd new file mode 100644 index 00000000..0969a2b7 --- /dev/null +++ b/bindings/r/man/WavePm.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WavePm} +\alias{WavePm} +\title{WavePm indicator} +\usage{ +WavePm(length, smoothing) +} +\description{ +WavePm indicator +} +\keyword{internal} diff --git a/bindings/r/man/WaveTrend.Rd b/bindings/r/man/WaveTrend.Rd new file mode 100644 index 00000000..7cba3c01 --- /dev/null +++ b/bindings/r/man/WaveTrend.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WaveTrend} +\alias{WaveTrend} +\title{WaveTrend indicator} +\usage{ +WaveTrend(channel_period, average_period, signal_period) +} +\description{ +WaveTrend indicator +} +\keyword{internal} diff --git a/bindings/r/man/Wedge.Rd b/bindings/r/man/Wedge.Rd new file mode 100644 index 00000000..8ba33a77 --- /dev/null +++ b/bindings/r/man/Wedge.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Wedge} +\alias{Wedge} +\title{Wedge indicator} +\usage{ +Wedge() +} +\description{ +Wedge indicator +} +\keyword{internal} diff --git a/bindings/r/man/WeightedClose.Rd b/bindings/r/man/WeightedClose.Rd new file mode 100644 index 00000000..0a8c4244 --- /dev/null +++ b/bindings/r/man/WeightedClose.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WeightedClose} +\alias{WeightedClose} +\title{WeightedClose indicator} +\usage{ +WeightedClose() +} +\description{ +WeightedClose indicator +} +\keyword{internal} diff --git a/bindings/r/man/WickRatio.Rd b/bindings/r/man/WickRatio.Rd new file mode 100644 index 00000000..22e5dd43 --- /dev/null +++ b/bindings/r/man/WickRatio.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WickRatio} +\alias{WickRatio} +\title{WickRatio indicator} +\usage{ +WickRatio() +} +\description{ +WickRatio indicator +} +\keyword{internal} diff --git a/bindings/r/man/WilliamsFractals.Rd b/bindings/r/man/WilliamsFractals.Rd new file mode 100644 index 00000000..de427a4a --- /dev/null +++ b/bindings/r/man/WilliamsFractals.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WilliamsFractals} +\alias{WilliamsFractals} +\title{WilliamsFractals indicator} +\usage{ +WilliamsFractals() +} +\description{ +WilliamsFractals indicator +} +\keyword{internal} diff --git a/bindings/r/man/WilliamsR.Rd b/bindings/r/man/WilliamsR.Rd new file mode 100644 index 00000000..5c5834a6 --- /dev/null +++ b/bindings/r/man/WilliamsR.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WilliamsR} +\alias{WilliamsR} +\title{WilliamsR indicator} +\usage{ +WilliamsR(period) +} +\description{ +WilliamsR indicator +} +\keyword{internal} diff --git a/bindings/r/man/WinRate.Rd b/bindings/r/man/WinRate.Rd new file mode 100644 index 00000000..9fccd448 --- /dev/null +++ b/bindings/r/man/WinRate.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WinRate} +\alias{WinRate} +\title{WinRate indicator} +\usage{ +WinRate(period) +} +\description{ +WinRate indicator +} +\keyword{internal} diff --git a/bindings/r/man/Wma.Rd b/bindings/r/man/Wma.Rd new file mode 100644 index 00000000..26fa9fd7 --- /dev/null +++ b/bindings/r/man/Wma.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Wma} +\alias{Wma} +\title{Wma indicator} +\usage{ +Wma(period) +} +\description{ +Wma indicator +} +\keyword{internal} diff --git a/bindings/r/man/WoodiePivots.Rd b/bindings/r/man/WoodiePivots.Rd new file mode 100644 index 00000000..6eecd170 --- /dev/null +++ b/bindings/r/man/WoodiePivots.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{WoodiePivots} +\alias{WoodiePivots} +\title{WoodiePivots indicator} +\usage{ +WoodiePivots() +} +\description{ +WoodiePivots indicator +} +\keyword{internal} diff --git a/bindings/r/man/YangZhangVolatility.Rd b/bindings/r/man/YangZhangVolatility.Rd new file mode 100644 index 00000000..9916200d --- /dev/null +++ b/bindings/r/man/YangZhangVolatility.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{YangZhangVolatility} +\alias{YangZhangVolatility} +\title{YangZhangVolatility indicator} +\usage{ +YangZhangVolatility(period, trading_periods) +} +\description{ +YangZhangVolatility indicator +} +\keyword{internal} diff --git a/bindings/r/man/YoyoExit.Rd b/bindings/r/man/YoyoExit.Rd new file mode 100644 index 00000000..dcac47a2 --- /dev/null +++ b/bindings/r/man/YoyoExit.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{YoyoExit} +\alias{YoyoExit} +\title{YoyoExit indicator} +\usage{ +YoyoExit(atr_period, multiplier) +} +\description{ +YoyoExit indicator +} +\keyword{internal} diff --git a/bindings/r/man/ZScore.Rd b/bindings/r/man/ZScore.Rd new file mode 100644 index 00000000..87374df6 --- /dev/null +++ b/bindings/r/man/ZScore.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ZScore} +\alias{ZScore} +\title{ZScore indicator} +\usage{ +ZScore(period) +} +\description{ +ZScore indicator +} +\keyword{internal} diff --git a/bindings/r/man/ZeroLagMacd.Rd b/bindings/r/man/ZeroLagMacd.Rd new file mode 100644 index 00000000..10e844bb --- /dev/null +++ b/bindings/r/man/ZeroLagMacd.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ZeroLagMacd} +\alias{ZeroLagMacd} +\title{ZeroLagMacd indicator} +\usage{ +ZeroLagMacd(fast, slow, signal) +} +\description{ +ZeroLagMacd indicator +} +\keyword{internal} diff --git a/bindings/r/man/ZigZag.Rd b/bindings/r/man/ZigZag.Rd new file mode 100644 index 00000000..d17fbbab --- /dev/null +++ b/bindings/r/man/ZigZag.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{ZigZag} +\alias{ZigZag} +\title{ZigZag indicator} +\usage{ +ZigZag(threshold) +} +\description{ +ZigZag indicator +} +\keyword{internal} diff --git a/bindings/r/man/Zlema.Rd b/bindings/r/man/Zlema.Rd new file mode 100644 index 00000000..6f3da7c2 --- /dev/null +++ b/bindings/r/man/Zlema.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/indicators.R +\name{Zlema} +\alias{Zlema} +\title{Zlema indicator} +\usage{ +Zlema(period) +} +\description{ +Zlema indicator +} +\keyword{internal} diff --git a/bindings/r/man/batch.Rd b/bindings/r/man/batch.Rd new file mode 100644 index 00000000..ae9f390b --- /dev/null +++ b/bindings/r/man/batch.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methods.R +\name{batch} +\alias{batch} +\alias{batch.wickra_indicator} +\title{Run an indicator over a whole series in one call} +\usage{ +batch(object, ...) + +\method{batch}{wickra_indicator}(object, ...) +} +\arguments{ +\item{object}{A \code{wickra_indicator}.} + +\item{...}{The input vector(s).} +} +\value{ +A numeric vector the same length as the input. +} +\description{ +Available for scalar indicators. The result is identical to feeding the same +inputs through \code{\link[=update]{update()}} one at a time, with \code{NA} at warmup positions. +} +\examples{ +batch(Sma(3), c(1, 2, 3, 4, 5)) # NA NA 2 3 4 +} diff --git a/bindings/r/man/reset.Rd b/bindings/r/man/reset.Rd new file mode 100644 index 00000000..d302fec9 --- /dev/null +++ b/bindings/r/man/reset.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methods.R +\name{reset} +\alias{reset} +\alias{reset.wickra_indicator} +\title{Reset an indicator to its warmup state} +\usage{ +reset(object) + +\method{reset}{wickra_indicator}(object) +} +\arguments{ +\item{object}{A \code{wickra_indicator}.} +} +\value{ +The indicator, invisibly. +} +\description{ +Reset an indicator to its warmup state +} +\examples{ +sma <- Sma(3) +update(sma, 1) +reset(sma) +} diff --git a/bindings/r/man/update.wickra_indicator.Rd b/bindings/r/man/update.wickra_indicator.Rd new file mode 100644 index 00000000..35af7ba3 --- /dev/null +++ b/bindings/r/man/update.wickra_indicator.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methods.R +\name{update.wickra_indicator} +\alias{update.wickra_indicator} +\title{Update an indicator with one observation} +\usage{ +\method{update}{wickra_indicator}(object, ...) +} +\arguments{ +\item{object}{A \code{wickra_indicator} created by an indicator constructor.} + +\item{...}{The observation: a single value for scalar indicators, the OHLCV +fields plus a timestamp for candle indicators, or two values for pairwise +indicators.} +} +\value{ +The indicator value: a numeric scalar; a named numeric vector for +multi-output indicators (\code{NA} during warmup); a matrix of completed bars for +bar builders; or a list / numeric vector for profile indicators +(\code{NULL} during warmup). +} +\description{ +Update an indicator with one observation +} +\examples{ +sma <- Sma(3) +for (x in c(1, 2, 3, 4, 5)) v <- update(sma, x) +v # 4 +} diff --git a/bindings/r/man/wickra-package.Rd b/bindings/r/man/wickra-package.Rd new file mode 100644 index 00000000..077701fc --- /dev/null +++ b/bindings/r/man/wickra-package.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/methods.R +\docType{package} +\name{wickra-package} +\alias{wickra} +\alias{wickra-package} +\title{wickra: streaming-first technical indicators} +\description{ +R bindings for the Wickra technical-analysis library over its C ABI hub. Each +indicator is a constructor (for example \code{\link[=Sma]{Sma()}}, \code{\link[=Rsi]{Rsi()}}, \code{\link[=MacdIndicator]{MacdIndicator()}}) +returning a \code{wickra_indicator} object; feed it one observation at a time with +\code{\link[=update]{update()}}, run a whole series in one call with \code{\link[=batch]{batch()}}, and clear its +state with \code{\link[=reset]{reset()}}. The native handle is freed automatically when the object +is garbage-collected. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/wickra-lib/wickra} + \item \url{https://docs.wickra.org} + \item Report bugs at \url{https://github.com/wickra-lib/wickra/issues} +} + +} +\author{ +\strong{Maintainer}: Wickra contributors \email{support@wickra.org} + +Authors: +\itemize{ + \item Wickra contributors \email{support@wickra.org} +} + +} +\keyword{internal} diff --git a/bindings/r/src/.gitignore b/bindings/r/src/.gitignore new file mode 100644 index 00000000..665573f6 --- /dev/null +++ b/bindings/r/src/.gitignore @@ -0,0 +1,7 @@ +# Build artifacts and the configure.win-generated C ABI import shims. +*.o +*.so +*.dll +*.dll.a +wickra_abi.def +symbols.rds diff --git a/bindings/r/src/Makevars b/bindings/r/src/Makevars new file mode 100644 index 00000000..73dd8ec9 --- /dev/null +++ b/bindings/r/src/Makevars @@ -0,0 +1,5 @@ +# The Wickra C ABI header and library are not vendored; point the build at them +# via WICKRA_INCLUDE_DIR (containing wickra.h) and WICKRA_LIB_DIR (containing +# libwickra). Build the library first with: cargo build -p wickra-c --release. +PKG_CPPFLAGS = -I$(WICKRA_INCLUDE_DIR) +PKG_LIBS = -L$(WICKRA_LIB_DIR) -lwickra -Wl,-rpath,$(WICKRA_LIB_DIR) diff --git a/bindings/r/src/Makevars.win b/bindings/r/src/Makevars.win new file mode 100644 index 00000000..2cf4d569 --- /dev/null +++ b/bindings/r/src/Makevars.win @@ -0,0 +1,5 @@ +# Link the import library built by configure.win (references wickra_abi.dll, not +# the package's own wickra.dll). The C ABI header dir is passed via +# WICKRA_INCLUDE_DIR at build time. +PKG_CPPFLAGS = -I$(WICKRA_INCLUDE_DIR) +PKG_LIBS = libwickra_abi.dll.a diff --git a/bindings/r/src/install.libs.R b/bindings/r/src/install.libs.R new file mode 100644 index 00000000..2d16568a --- /dev/null +++ b/bindings/r/src/install.libs.R @@ -0,0 +1,10 @@ +# Install the compiled package shared object plus, on Windows, the bundled +# wickra_abi.dll (matched by the *.dll glob) so the loader can resolve the import +# from the package's own libs directory (see .onLoad, which puts it on PATH). +files <- Sys.glob(paste0("*", SHLIB_EXT)) +dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH)) +dir.create(dest, recursive = TRUE, showWarnings = FALSE) +file.copy(files, dest, overwrite = TRUE) +if (file.exists("symbols.rds")) { + file.copy("symbols.rds", dest, overwrite = TRUE) +} diff --git a/bindings/r/src/wickra.c b/bindings/r/src/wickra.c new file mode 100644 index 00000000..f3750d37 --- /dev/null +++ b/bindings/r/src/wickra.c @@ -0,0 +1,18342 @@ +/* Generated from bindings/c/include/wickra.h. DO NOT EDIT. */ +#include +#include +#include +#include +#include +#include +#include "wickra.h" + +static void abandoned_baby_fin(SEXP e) { + struct AbandonedBaby *h = (struct AbandonedBaby *)R_ExternalPtrAddr(e); + if (h) wickra_abandoned_baby_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_abandoned_baby_new(void) { + struct AbandonedBaby *h = wickra_abandoned_baby_new(); + if (!h) Rf_error("invalid AbandonedBaby parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, abandoned_baby_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_abandoned_baby_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AbandonedBaby *h = (struct AbandonedBaby *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_abandoned_baby_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_abandoned_baby_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AbandonedBaby *h = (struct AbandonedBaby *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_abandoned_baby_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_abandoned_baby_reset(SEXP e) { + struct AbandonedBaby *h = (struct AbandonedBaby *)R_ExternalPtrAddr(e); + wickra_abandoned_baby_reset(h); + return R_NilValue; +} + +static void abcd_fin(SEXP e) { + struct Abcd *h = (struct Abcd *)R_ExternalPtrAddr(e); + if (h) wickra_abcd_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_abcd_new(void) { + struct Abcd *h = wickra_abcd_new(); + if (!h) Rf_error("invalid Abcd parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, abcd_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_abcd_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Abcd *h = (struct Abcd *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_abcd_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_abcd_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Abcd *h = (struct Abcd *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_abcd_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_abcd_reset(SEXP e) { + struct Abcd *h = (struct Abcd *)R_ExternalPtrAddr(e); + wickra_abcd_reset(h); + return R_NilValue; +} + +static void absolute_breadth_index_fin(SEXP e) { + struct AbsoluteBreadthIndex *h = (struct AbsoluteBreadthIndex *)R_ExternalPtrAddr(e); + if (h) wickra_absolute_breadth_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_absolute_breadth_index_new(void) { + struct AbsoluteBreadthIndex *h = wickra_absolute_breadth_index_new(); + if (!h) Rf_error("invalid AbsoluteBreadthIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, absolute_breadth_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_absolute_breadth_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct AbsoluteBreadthIndex *h = (struct AbsoluteBreadthIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_absolute_breadth_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_absolute_breadth_index_reset(SEXP e) { + struct AbsoluteBreadthIndex *h = (struct AbsoluteBreadthIndex *)R_ExternalPtrAddr(e); + wickra_absolute_breadth_index_reset(h); + return R_NilValue; +} + +static void acceleration_bands_fin(SEXP e) { + struct AccelerationBands *h = (struct AccelerationBands *)R_ExternalPtrAddr(e); + if (h) wickra_acceleration_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_acceleration_bands_new(SEXP a0, SEXP a1) { + struct AccelerationBands *h = wickra_acceleration_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid AccelerationBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, acceleration_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_acceleration_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AccelerationBands *h = (struct AccelerationBands *)R_ExternalPtrAddr(e); + struct WickraAccelerationBandsOutput out; + int ok = wickra_acceleration_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_acceleration_bands_reset(SEXP e) { + struct AccelerationBands *h = (struct AccelerationBands *)R_ExternalPtrAddr(e); + wickra_acceleration_bands_reset(h); + return R_NilValue; +} + +static void accelerator_oscillator_fin(SEXP e) { + struct AcceleratorOscillator *h = (struct AcceleratorOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_accelerator_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_accelerator_oscillator_new(SEXP a0, SEXP a1, SEXP a2) { + struct AcceleratorOscillator *h = wickra_accelerator_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid AcceleratorOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, accelerator_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_accelerator_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AcceleratorOscillator *h = (struct AcceleratorOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_accelerator_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_accelerator_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AcceleratorOscillator *h = (struct AcceleratorOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_accelerator_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_accelerator_oscillator_reset(SEXP e) { + struct AcceleratorOscillator *h = (struct AcceleratorOscillator *)R_ExternalPtrAddr(e); + wickra_accelerator_oscillator_reset(h); + return R_NilValue; +} + +static void ad_oscillator_fin(SEXP e) { + struct AdOscillator *h = (struct AdOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_ad_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ad_oscillator_new(void) { + struct AdOscillator *h = wickra_ad_oscillator_new(); + if (!h) Rf_error("invalid AdOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ad_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ad_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdOscillator *h = (struct AdOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ad_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_ad_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdOscillator *h = (struct AdOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_ad_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ad_oscillator_reset(SEXP e) { + struct AdOscillator *h = (struct AdOscillator *)R_ExternalPtrAddr(e); + wickra_ad_oscillator_reset(h); + return R_NilValue; +} + +static void ad_volume_line_fin(SEXP e) { + struct AdVolumeLine *h = (struct AdVolumeLine *)R_ExternalPtrAddr(e); + if (h) wickra_ad_volume_line_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ad_volume_line_new(void) { + struct AdVolumeLine *h = wickra_ad_volume_line_new(); + if (!h) Rf_error("invalid AdVolumeLine parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ad_volume_line_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ad_volume_line_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct AdVolumeLine *h = (struct AdVolumeLine *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ad_volume_line_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_ad_volume_line_reset(SEXP e) { + struct AdVolumeLine *h = (struct AdVolumeLine *)R_ExternalPtrAddr(e); + wickra_ad_volume_line_reset(h); + return R_NilValue; +} + +static void adaptive_cci_fin(SEXP e) { + struct AdaptiveCci *h = (struct AdaptiveCci *)R_ExternalPtrAddr(e); + if (h) wickra_adaptive_cci_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adaptive_cci_new(SEXP a0) { + struct AdaptiveCci *h = wickra_adaptive_cci_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AdaptiveCci parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adaptive_cci_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adaptive_cci_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdaptiveCci *h = (struct AdaptiveCci *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adaptive_cci_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_adaptive_cci_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdaptiveCci *h = (struct AdaptiveCci *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_adaptive_cci_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adaptive_cci_reset(SEXP e) { + struct AdaptiveCci *h = (struct AdaptiveCci *)R_ExternalPtrAddr(e); + wickra_adaptive_cci_reset(h); + return R_NilValue; +} + +static void adaptive_cycle_fin(SEXP e) { + struct AdaptiveCycle *h = (struct AdaptiveCycle *)R_ExternalPtrAddr(e); + if (h) wickra_adaptive_cycle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adaptive_cycle_new(void) { + struct AdaptiveCycle *h = wickra_adaptive_cycle_new(); + if (!h) Rf_error("invalid AdaptiveCycle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adaptive_cycle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adaptive_cycle_update(SEXP e, SEXP a0) { + struct AdaptiveCycle *h = (struct AdaptiveCycle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adaptive_cycle_update(h, Rf_asReal(a0))); +} +SEXP wk_adaptive_cycle_batch(SEXP e, SEXP a0) { + struct AdaptiveCycle *h = (struct AdaptiveCycle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_adaptive_cycle_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adaptive_cycle_reset(SEXP e) { + struct AdaptiveCycle *h = (struct AdaptiveCycle *)R_ExternalPtrAddr(e); + wickra_adaptive_cycle_reset(h); + return R_NilValue; +} + +static void adaptive_laguerre_filter_fin(SEXP e) { + struct AdaptiveLaguerreFilter *h = (struct AdaptiveLaguerreFilter *)R_ExternalPtrAddr(e); + if (h) wickra_adaptive_laguerre_filter_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adaptive_laguerre_filter_new(SEXP a0) { + struct AdaptiveLaguerreFilter *h = wickra_adaptive_laguerre_filter_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AdaptiveLaguerreFilter parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adaptive_laguerre_filter_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adaptive_laguerre_filter_update(SEXP e, SEXP a0) { + struct AdaptiveLaguerreFilter *h = (struct AdaptiveLaguerreFilter *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adaptive_laguerre_filter_update(h, Rf_asReal(a0))); +} +SEXP wk_adaptive_laguerre_filter_batch(SEXP e, SEXP a0) { + struct AdaptiveLaguerreFilter *h = (struct AdaptiveLaguerreFilter *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_adaptive_laguerre_filter_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adaptive_laguerre_filter_reset(SEXP e) { + struct AdaptiveLaguerreFilter *h = (struct AdaptiveLaguerreFilter *)R_ExternalPtrAddr(e); + wickra_adaptive_laguerre_filter_reset(h); + return R_NilValue; +} + +static void adaptive_rsi_fin(SEXP e) { + struct AdaptiveRsi *h = (struct AdaptiveRsi *)R_ExternalPtrAddr(e); + if (h) wickra_adaptive_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adaptive_rsi_new(SEXP a0) { + struct AdaptiveRsi *h = wickra_adaptive_rsi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AdaptiveRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adaptive_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adaptive_rsi_update(SEXP e, SEXP a0) { + struct AdaptiveRsi *h = (struct AdaptiveRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adaptive_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_adaptive_rsi_batch(SEXP e, SEXP a0) { + struct AdaptiveRsi *h = (struct AdaptiveRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_adaptive_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adaptive_rsi_reset(SEXP e) { + struct AdaptiveRsi *h = (struct AdaptiveRsi *)R_ExternalPtrAddr(e); + wickra_adaptive_rsi_reset(h); + return R_NilValue; +} + +static void adl_fin(SEXP e) { + struct Adl *h = (struct Adl *)R_ExternalPtrAddr(e); + if (h) wickra_adl_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adl_new(void) { + struct Adl *h = wickra_adl_new(); + if (!h) Rf_error("invalid Adl parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adl_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adl_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Adl *h = (struct Adl *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adl_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_adl_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Adl *h = (struct Adl *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_adl_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adl_reset(SEXP e) { + struct Adl *h = (struct Adl *)R_ExternalPtrAddr(e); + wickra_adl_reset(h); + return R_NilValue; +} + +static void advance_block_fin(SEXP e) { + struct AdvanceBlock *h = (struct AdvanceBlock *)R_ExternalPtrAddr(e); + if (h) wickra_advance_block_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_advance_block_new(void) { + struct AdvanceBlock *h = wickra_advance_block_new(); + if (!h) Rf_error("invalid AdvanceBlock parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, advance_block_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_advance_block_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdvanceBlock *h = (struct AdvanceBlock *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_advance_block_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_advance_block_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AdvanceBlock *h = (struct AdvanceBlock *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_advance_block_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_advance_block_reset(SEXP e) { + struct AdvanceBlock *h = (struct AdvanceBlock *)R_ExternalPtrAddr(e); + wickra_advance_block_reset(h); + return R_NilValue; +} + +static void advance_decline_fin(SEXP e) { + struct AdvanceDecline *h = (struct AdvanceDecline *)R_ExternalPtrAddr(e); + if (h) wickra_advance_decline_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_advance_decline_new(void) { + struct AdvanceDecline *h = wickra_advance_decline_new(); + if (!h) Rf_error("invalid AdvanceDecline parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, advance_decline_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_advance_decline_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct AdvanceDecline *h = (struct AdvanceDecline *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_advance_decline_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_advance_decline_reset(SEXP e) { + struct AdvanceDecline *h = (struct AdvanceDecline *)R_ExternalPtrAddr(e); + wickra_advance_decline_reset(h); + return R_NilValue; +} + +static void advance_decline_ratio_fin(SEXP e) { + struct AdvanceDeclineRatio *h = (struct AdvanceDeclineRatio *)R_ExternalPtrAddr(e); + if (h) wickra_advance_decline_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_advance_decline_ratio_new(void) { + struct AdvanceDeclineRatio *h = wickra_advance_decline_ratio_new(); + if (!h) Rf_error("invalid AdvanceDeclineRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, advance_decline_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_advance_decline_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct AdvanceDeclineRatio *h = (struct AdvanceDeclineRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_advance_decline_ratio_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_advance_decline_ratio_reset(SEXP e) { + struct AdvanceDeclineRatio *h = (struct AdvanceDeclineRatio *)R_ExternalPtrAddr(e); + wickra_advance_decline_ratio_reset(h); + return R_NilValue; +} + +static void adx_fin(SEXP e) { + struct Adx *h = (struct Adx *)R_ExternalPtrAddr(e); + if (h) wickra_adx_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adx_new(SEXP a0) { + struct Adx *h = wickra_adx_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Adx parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adx_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adx_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Adx *h = (struct Adx *)R_ExternalPtrAddr(e); + struct WickraAdxOutput out; + int ok = wickra_adx_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.plus_di : NA_REAL; + REAL(r)[1] = ok ? (double)out.minus_di : NA_REAL; + REAL(r)[2] = ok ? (double)out.adx : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("plus_di")); + SET_STRING_ELT(nm, 1, Rf_mkChar("minus_di")); + SET_STRING_ELT(nm, 2, Rf_mkChar("adx")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_adx_reset(SEXP e) { + struct Adx *h = (struct Adx *)R_ExternalPtrAddr(e); + wickra_adx_reset(h); + return R_NilValue; +} + +static void adxr_fin(SEXP e) { + struct Adxr *h = (struct Adxr *)R_ExternalPtrAddr(e); + if (h) wickra_adxr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_adxr_new(SEXP a0) { + struct Adxr *h = wickra_adxr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Adxr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, adxr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_adxr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Adxr *h = (struct Adxr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_adxr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_adxr_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Adxr *h = (struct Adxr *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_adxr_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_adxr_reset(SEXP e) { + struct Adxr *h = (struct Adxr *)R_ExternalPtrAddr(e); + wickra_adxr_reset(h); + return R_NilValue; +} + +static void alligator_fin(SEXP e) { + struct Alligator *h = (struct Alligator *)R_ExternalPtrAddr(e); + if (h) wickra_alligator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_alligator_new(SEXP a0, SEXP a1, SEXP a2) { + struct Alligator *h = wickra_alligator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid Alligator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, alligator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_alligator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Alligator *h = (struct Alligator *)R_ExternalPtrAddr(e); + struct WickraAlligatorOutput out; + int ok = wickra_alligator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.jaw : NA_REAL; + REAL(r)[1] = ok ? (double)out.teeth : NA_REAL; + REAL(r)[2] = ok ? (double)out.lips : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("jaw")); + SET_STRING_ELT(nm, 1, Rf_mkChar("teeth")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lips")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_alligator_reset(SEXP e) { + struct Alligator *h = (struct Alligator *)R_ExternalPtrAddr(e); + wickra_alligator_reset(h); + return R_NilValue; +} + +static void alma_fin(SEXP e) { + struct Alma *h = (struct Alma *)R_ExternalPtrAddr(e); + if (h) wickra_alma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_alma_new(SEXP a0, SEXP a1, SEXP a2) { + struct Alma *h = wickra_alma_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid Alma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, alma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_alma_update(SEXP e, SEXP a0) { + struct Alma *h = (struct Alma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_alma_update(h, Rf_asReal(a0))); +} +SEXP wk_alma_batch(SEXP e, SEXP a0) { + struct Alma *h = (struct Alma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_alma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_alma_reset(SEXP e) { + struct Alma *h = (struct Alma *)R_ExternalPtrAddr(e); + wickra_alma_reset(h); + return R_NilValue; +} + +static void alpha_fin(SEXP e) { + struct Alpha *h = (struct Alpha *)R_ExternalPtrAddr(e); + if (h) wickra_alpha_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_alpha_new(SEXP a0, SEXP a1) { + struct Alpha *h = wickra_alpha_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid Alpha parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, alpha_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_alpha_update(SEXP e, SEXP a0, SEXP a1) { + struct Alpha *h = (struct Alpha *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_alpha_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_alpha_batch(SEXP e, SEXP a0, SEXP a1) { + struct Alpha *h = (struct Alpha *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_alpha_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_alpha_reset(SEXP e) { + struct Alpha *h = (struct Alpha *)R_ExternalPtrAddr(e); + wickra_alpha_reset(h); + return R_NilValue; +} + +static void amihud_illiquidity_fin(SEXP e) { + struct AmihudIlliquidity *h = (struct AmihudIlliquidity *)R_ExternalPtrAddr(e); + if (h) wickra_amihud_illiquidity_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_amihud_illiquidity_new(SEXP a0) { + struct AmihudIlliquidity *h = wickra_amihud_illiquidity_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AmihudIlliquidity parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, amihud_illiquidity_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_amihud_illiquidity_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct AmihudIlliquidity *h = (struct AmihudIlliquidity *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_amihud_illiquidity_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_amihud_illiquidity_reset(SEXP e) { + struct AmihudIlliquidity *h = (struct AmihudIlliquidity *)R_ExternalPtrAddr(e); + wickra_amihud_illiquidity_reset(h); + return R_NilValue; +} + +static void anchored_rsi_fin(SEXP e) { + struct AnchoredRsi *h = (struct AnchoredRsi *)R_ExternalPtrAddr(e); + if (h) wickra_anchored_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_anchored_rsi_new(void) { + struct AnchoredRsi *h = wickra_anchored_rsi_new(); + if (!h) Rf_error("invalid AnchoredRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, anchored_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_anchored_rsi_update(SEXP e, SEXP a0) { + struct AnchoredRsi *h = (struct AnchoredRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_anchored_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_anchored_rsi_batch(SEXP e, SEXP a0) { + struct AnchoredRsi *h = (struct AnchoredRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_anchored_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_anchored_rsi_reset(SEXP e) { + struct AnchoredRsi *h = (struct AnchoredRsi *)R_ExternalPtrAddr(e); + wickra_anchored_rsi_reset(h); + return R_NilValue; +} + +static void anchored_vwap_fin(SEXP e) { + struct AnchoredVwap *h = (struct AnchoredVwap *)R_ExternalPtrAddr(e); + if (h) wickra_anchored_vwap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_anchored_vwap_new(void) { + struct AnchoredVwap *h = wickra_anchored_vwap_new(); + if (!h) Rf_error("invalid AnchoredVwap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, anchored_vwap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_anchored_vwap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AnchoredVwap *h = (struct AnchoredVwap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_anchored_vwap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_anchored_vwap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AnchoredVwap *h = (struct AnchoredVwap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_anchored_vwap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_anchored_vwap_reset(SEXP e) { + struct AnchoredVwap *h = (struct AnchoredVwap *)R_ExternalPtrAddr(e); + wickra_anchored_vwap_reset(h); + return R_NilValue; +} + +static void andrews_pitchfork_fin(SEXP e) { + struct AndrewsPitchfork *h = (struct AndrewsPitchfork *)R_ExternalPtrAddr(e); + if (h) wickra_andrews_pitchfork_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_andrews_pitchfork_new(SEXP a0) { + struct AndrewsPitchfork *h = wickra_andrews_pitchfork_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AndrewsPitchfork parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, andrews_pitchfork_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_andrews_pitchfork_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AndrewsPitchfork *h = (struct AndrewsPitchfork *)R_ExternalPtrAddr(e); + struct WickraAndrewsPitchforkOutput out; + int ok = wickra_andrews_pitchfork_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.median : NA_REAL; + REAL(r)[1] = ok ? (double)out.upper : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("median")); + SET_STRING_ELT(nm, 1, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_andrews_pitchfork_reset(SEXP e) { + struct AndrewsPitchfork *h = (struct AndrewsPitchfork *)R_ExternalPtrAddr(e); + wickra_andrews_pitchfork_reset(h); + return R_NilValue; +} + +static void apo_fin(SEXP e) { + struct Apo *h = (struct Apo *)R_ExternalPtrAddr(e); + if (h) wickra_apo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_apo_new(SEXP a0, SEXP a1) { + struct Apo *h = wickra_apo_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Apo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, apo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_apo_update(SEXP e, SEXP a0) { + struct Apo *h = (struct Apo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_apo_update(h, Rf_asReal(a0))); +} +SEXP wk_apo_batch(SEXP e, SEXP a0) { + struct Apo *h = (struct Apo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_apo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_apo_reset(SEXP e) { + struct Apo *h = (struct Apo *)R_ExternalPtrAddr(e); + wickra_apo_reset(h); + return R_NilValue; +} + +static void aroon_fin(SEXP e) { + struct Aroon *h = (struct Aroon *)R_ExternalPtrAddr(e); + if (h) wickra_aroon_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_aroon_new(SEXP a0) { + struct Aroon *h = wickra_aroon_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Aroon parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, aroon_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_aroon_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Aroon *h = (struct Aroon *)R_ExternalPtrAddr(e); + struct WickraAroonOutput out; + int ok = wickra_aroon_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.up : NA_REAL; + REAL(r)[1] = ok ? (double)out.down : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("up")); + SET_STRING_ELT(nm, 1, Rf_mkChar("down")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_aroon_reset(SEXP e) { + struct Aroon *h = (struct Aroon *)R_ExternalPtrAddr(e); + wickra_aroon_reset(h); + return R_NilValue; +} + +static void aroon_oscillator_fin(SEXP e) { + struct AroonOscillator *h = (struct AroonOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_aroon_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_aroon_oscillator_new(SEXP a0) { + struct AroonOscillator *h = wickra_aroon_oscillator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AroonOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, aroon_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_aroon_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AroonOscillator *h = (struct AroonOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_aroon_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_aroon_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AroonOscillator *h = (struct AroonOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_aroon_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_aroon_oscillator_reset(SEXP e) { + struct AroonOscillator *h = (struct AroonOscillator *)R_ExternalPtrAddr(e); + wickra_aroon_oscillator_reset(h); + return R_NilValue; +} + +static void atr_fin(SEXP e) { + struct Atr *h = (struct Atr *)R_ExternalPtrAddr(e); + if (h) wickra_atr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_atr_new(SEXP a0) { + struct Atr *h = wickra_atr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Atr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, atr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_atr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Atr *h = (struct Atr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_atr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_atr_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Atr *h = (struct Atr *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_atr_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_atr_reset(SEXP e) { + struct Atr *h = (struct Atr *)R_ExternalPtrAddr(e); + wickra_atr_reset(h); + return R_NilValue; +} + +static void atr_bands_fin(SEXP e) { + struct AtrBands *h = (struct AtrBands *)R_ExternalPtrAddr(e); + if (h) wickra_atr_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_atr_bands_new(SEXP a0, SEXP a1) { + struct AtrBands *h = wickra_atr_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid AtrBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, atr_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_atr_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AtrBands *h = (struct AtrBands *)R_ExternalPtrAddr(e); + struct WickraAtrBandsOutput out; + int ok = wickra_atr_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_atr_bands_reset(SEXP e) { + struct AtrBands *h = (struct AtrBands *)R_ExternalPtrAddr(e); + wickra_atr_bands_reset(h); + return R_NilValue; +} + +static void atr_ratchet_fin(SEXP e) { + struct AtrRatchet *h = (struct AtrRatchet *)R_ExternalPtrAddr(e); + if (h) wickra_atr_ratchet_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_atr_ratchet_new(SEXP a0, SEXP a1, SEXP a2) { + struct AtrRatchet *h = wickra_atr_ratchet_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid AtrRatchet parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, atr_ratchet_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_atr_ratchet_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AtrRatchet *h = (struct AtrRatchet *)R_ExternalPtrAddr(e); + struct WickraAtrRatchetOutput out; + int ok = wickra_atr_ratchet_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_atr_ratchet_reset(SEXP e) { + struct AtrRatchet *h = (struct AtrRatchet *)R_ExternalPtrAddr(e); + wickra_atr_ratchet_reset(h); + return R_NilValue; +} + +static void atr_trailing_stop_fin(SEXP e) { + struct AtrTrailingStop *h = (struct AtrTrailingStop *)R_ExternalPtrAddr(e); + if (h) wickra_atr_trailing_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_atr_trailing_stop_new(SEXP a0, SEXP a1) { + struct AtrTrailingStop *h = wickra_atr_trailing_stop_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid AtrTrailingStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, atr_trailing_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_atr_trailing_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AtrTrailingStop *h = (struct AtrTrailingStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_atr_trailing_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_atr_trailing_stop_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AtrTrailingStop *h = (struct AtrTrailingStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_atr_trailing_stop_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_atr_trailing_stop_reset(SEXP e) { + struct AtrTrailingStop *h = (struct AtrTrailingStop *)R_ExternalPtrAddr(e); + wickra_atr_trailing_stop_reset(h); + return R_NilValue; +} + +static void auto_fib_fin(SEXP e) { + struct AutoFib *h = (struct AutoFib *)R_ExternalPtrAddr(e); + if (h) wickra_auto_fib_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_auto_fib_new(void) { + struct AutoFib *h = wickra_auto_fib_new(); + if (!h) Rf_error("invalid AutoFib parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, auto_fib_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_auto_fib_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AutoFib *h = (struct AutoFib *)R_ExternalPtrAddr(e); + struct WickraAutoFibOutput out; + int ok = wickra_auto_fib_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 7)); + REAL(r)[0] = ok ? (double)out.level_0 : NA_REAL; + REAL(r)[1] = ok ? (double)out.level_236 : NA_REAL; + REAL(r)[2] = ok ? (double)out.level_382 : NA_REAL; + REAL(r)[3] = ok ? (double)out.level_500 : NA_REAL; + REAL(r)[4] = ok ? (double)out.level_618 : NA_REAL; + REAL(r)[5] = ok ? (double)out.level_786 : NA_REAL; + REAL(r)[6] = ok ? (double)out.level_1000 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(nm, 0, Rf_mkChar("level_0")); + SET_STRING_ELT(nm, 1, Rf_mkChar("level_236")); + SET_STRING_ELT(nm, 2, Rf_mkChar("level_382")); + SET_STRING_ELT(nm, 3, Rf_mkChar("level_500")); + SET_STRING_ELT(nm, 4, Rf_mkChar("level_618")); + SET_STRING_ELT(nm, 5, Rf_mkChar("level_786")); + SET_STRING_ELT(nm, 6, Rf_mkChar("level_1000")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_auto_fib_reset(SEXP e) { + struct AutoFib *h = (struct AutoFib *)R_ExternalPtrAddr(e); + wickra_auto_fib_reset(h); + return R_NilValue; +} + +static void autocorrelation_fin(SEXP e) { + struct Autocorrelation *h = (struct Autocorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_autocorrelation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_autocorrelation_new(SEXP a0, SEXP a1) { + struct Autocorrelation *h = wickra_autocorrelation_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Autocorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, autocorrelation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_autocorrelation_update(SEXP e, SEXP a0) { + struct Autocorrelation *h = (struct Autocorrelation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_autocorrelation_update(h, Rf_asReal(a0))); +} +SEXP wk_autocorrelation_batch(SEXP e, SEXP a0) { + struct Autocorrelation *h = (struct Autocorrelation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_autocorrelation_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_autocorrelation_reset(SEXP e) { + struct Autocorrelation *h = (struct Autocorrelation *)R_ExternalPtrAddr(e); + wickra_autocorrelation_reset(h); + return R_NilValue; +} + +static void autocorrelation_periodogram_fin(SEXP e) { + struct AutocorrelationPeriodogram *h = (struct AutocorrelationPeriodogram *)R_ExternalPtrAddr(e); + if (h) wickra_autocorrelation_periodogram_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_autocorrelation_periodogram_new(SEXP a0, SEXP a1) { + struct AutocorrelationPeriodogram *h = wickra_autocorrelation_periodogram_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid AutocorrelationPeriodogram parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, autocorrelation_periodogram_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_autocorrelation_periodogram_update(SEXP e, SEXP a0) { + struct AutocorrelationPeriodogram *h = (struct AutocorrelationPeriodogram *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_autocorrelation_periodogram_update(h, Rf_asReal(a0))); +} +SEXP wk_autocorrelation_periodogram_batch(SEXP e, SEXP a0) { + struct AutocorrelationPeriodogram *h = (struct AutocorrelationPeriodogram *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_autocorrelation_periodogram_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_autocorrelation_periodogram_reset(SEXP e) { + struct AutocorrelationPeriodogram *h = (struct AutocorrelationPeriodogram *)R_ExternalPtrAddr(e); + wickra_autocorrelation_periodogram_reset(h); + return R_NilValue; +} + +static void average_daily_range_fin(SEXP e) { + struct AverageDailyRange *h = (struct AverageDailyRange *)R_ExternalPtrAddr(e); + if (h) wickra_average_daily_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_average_daily_range_new(SEXP a0, SEXP a1) { + struct AverageDailyRange *h = wickra_average_daily_range_new((uintptr_t)Rf_asReal(a0), (int32_t)Rf_asInteger(a1)); + if (!h) Rf_error("invalid AverageDailyRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, average_daily_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_average_daily_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AverageDailyRange *h = (struct AverageDailyRange *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_average_daily_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_average_daily_range_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AverageDailyRange *h = (struct AverageDailyRange *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_average_daily_range_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_average_daily_range_reset(SEXP e) { + struct AverageDailyRange *h = (struct AverageDailyRange *)R_ExternalPtrAddr(e); + wickra_average_daily_range_reset(h); + return R_NilValue; +} + +static void average_drawdown_fin(SEXP e) { + struct AverageDrawdown *h = (struct AverageDrawdown *)R_ExternalPtrAddr(e); + if (h) wickra_average_drawdown_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_average_drawdown_new(SEXP a0) { + struct AverageDrawdown *h = wickra_average_drawdown_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid AverageDrawdown parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, average_drawdown_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_average_drawdown_update(SEXP e, SEXP a0) { + struct AverageDrawdown *h = (struct AverageDrawdown *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_average_drawdown_update(h, Rf_asReal(a0))); +} +SEXP wk_average_drawdown_batch(SEXP e, SEXP a0) { + struct AverageDrawdown *h = (struct AverageDrawdown *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_average_drawdown_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_average_drawdown_reset(SEXP e) { + struct AverageDrawdown *h = (struct AverageDrawdown *)R_ExternalPtrAddr(e); + wickra_average_drawdown_reset(h); + return R_NilValue; +} + +static void avg_price_fin(SEXP e) { + struct AvgPrice *h = (struct AvgPrice *)R_ExternalPtrAddr(e); + if (h) wickra_avg_price_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_avg_price_new(void) { + struct AvgPrice *h = wickra_avg_price_new(); + if (!h) Rf_error("invalid AvgPrice parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, avg_price_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_avg_price_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AvgPrice *h = (struct AvgPrice *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_avg_price_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_avg_price_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AvgPrice *h = (struct AvgPrice *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_avg_price_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_avg_price_reset(SEXP e) { + struct AvgPrice *h = (struct AvgPrice *)R_ExternalPtrAddr(e); + wickra_avg_price_reset(h); + return R_NilValue; +} + +static void awesome_oscillator_fin(SEXP e) { + struct AwesomeOscillator *h = (struct AwesomeOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_awesome_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_awesome_oscillator_new(SEXP a0, SEXP a1) { + struct AwesomeOscillator *h = wickra_awesome_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid AwesomeOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, awesome_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_awesome_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AwesomeOscillator *h = (struct AwesomeOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_awesome_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_awesome_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AwesomeOscillator *h = (struct AwesomeOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_awesome_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_awesome_oscillator_reset(SEXP e) { + struct AwesomeOscillator *h = (struct AwesomeOscillator *)R_ExternalPtrAddr(e); + wickra_awesome_oscillator_reset(h); + return R_NilValue; +} + +static void awesome_oscillator_histogram_fin(SEXP e) { + struct AwesomeOscillatorHistogram *h = (struct AwesomeOscillatorHistogram *)R_ExternalPtrAddr(e); + if (h) wickra_awesome_oscillator_histogram_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_awesome_oscillator_histogram_new(SEXP a0, SEXP a1, SEXP a2) { + struct AwesomeOscillatorHistogram *h = wickra_awesome_oscillator_histogram_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid AwesomeOscillatorHistogram parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, awesome_oscillator_histogram_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_awesome_oscillator_histogram_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AwesomeOscillatorHistogram *h = (struct AwesomeOscillatorHistogram *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_awesome_oscillator_histogram_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_awesome_oscillator_histogram_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct AwesomeOscillatorHistogram *h = (struct AwesomeOscillatorHistogram *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_awesome_oscillator_histogram_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_awesome_oscillator_histogram_reset(SEXP e) { + struct AwesomeOscillatorHistogram *h = (struct AwesomeOscillatorHistogram *)R_ExternalPtrAddr(e); + wickra_awesome_oscillator_histogram_reset(h); + return R_NilValue; +} + +static void balance_of_power_fin(SEXP e) { + struct BalanceOfPower *h = (struct BalanceOfPower *)R_ExternalPtrAddr(e); + if (h) wickra_balance_of_power_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_balance_of_power_new(void) { + struct BalanceOfPower *h = wickra_balance_of_power_new(); + if (!h) Rf_error("invalid BalanceOfPower parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, balance_of_power_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_balance_of_power_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BalanceOfPower *h = (struct BalanceOfPower *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_balance_of_power_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_balance_of_power_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BalanceOfPower *h = (struct BalanceOfPower *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_balance_of_power_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_balance_of_power_reset(SEXP e) { + struct BalanceOfPower *h = (struct BalanceOfPower *)R_ExternalPtrAddr(e); + wickra_balance_of_power_reset(h); + return R_NilValue; +} + +static void bandpass_filter_fin(SEXP e) { + struct BandpassFilter *h = (struct BandpassFilter *)R_ExternalPtrAddr(e); + if (h) wickra_bandpass_filter_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bandpass_filter_new(SEXP a0, SEXP a1) { + struct BandpassFilter *h = wickra_bandpass_filter_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid BandpassFilter parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bandpass_filter_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bandpass_filter_update(SEXP e, SEXP a0) { + struct BandpassFilter *h = (struct BandpassFilter *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_bandpass_filter_update(h, Rf_asReal(a0))); +} +SEXP wk_bandpass_filter_batch(SEXP e, SEXP a0) { + struct BandpassFilter *h = (struct BandpassFilter *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_bandpass_filter_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_bandpass_filter_reset(SEXP e) { + struct BandpassFilter *h = (struct BandpassFilter *)R_ExternalPtrAddr(e); + wickra_bandpass_filter_reset(h); + return R_NilValue; +} + +static void bat_fin(SEXP e) { + struct Bat *h = (struct Bat *)R_ExternalPtrAddr(e); + if (h) wickra_bat_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bat_new(void) { + struct Bat *h = wickra_bat_new(); + if (!h) Rf_error("invalid Bat parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bat_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bat_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Bat *h = (struct Bat *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_bat_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_bat_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Bat *h = (struct Bat *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_bat_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_bat_reset(SEXP e) { + struct Bat *h = (struct Bat *)R_ExternalPtrAddr(e); + wickra_bat_reset(h); + return R_NilValue; +} + +static void belt_hold_fin(SEXP e) { + struct BeltHold *h = (struct BeltHold *)R_ExternalPtrAddr(e); + if (h) wickra_belt_hold_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_belt_hold_new(void) { + struct BeltHold *h = wickra_belt_hold_new(); + if (!h) Rf_error("invalid BeltHold parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, belt_hold_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_belt_hold_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BeltHold *h = (struct BeltHold *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_belt_hold_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_belt_hold_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BeltHold *h = (struct BeltHold *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_belt_hold_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_belt_hold_reset(SEXP e) { + struct BeltHold *h = (struct BeltHold *)R_ExternalPtrAddr(e); + wickra_belt_hold_reset(h); + return R_NilValue; +} + +static void beta_fin(SEXP e) { + struct Beta *h = (struct Beta *)R_ExternalPtrAddr(e); + if (h) wickra_beta_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_beta_new(SEXP a0) { + struct Beta *h = wickra_beta_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Beta parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, beta_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_beta_update(SEXP e, SEXP a0, SEXP a1) { + struct Beta *h = (struct Beta *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_beta_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_beta_batch(SEXP e, SEXP a0, SEXP a1) { + struct Beta *h = (struct Beta *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_beta_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_beta_reset(SEXP e) { + struct Beta *h = (struct Beta *)R_ExternalPtrAddr(e); + wickra_beta_reset(h); + return R_NilValue; +} + +static void beta_neutral_spread_fin(SEXP e) { + struct BetaNeutralSpread *h = (struct BetaNeutralSpread *)R_ExternalPtrAddr(e); + if (h) wickra_beta_neutral_spread_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_beta_neutral_spread_new(SEXP a0) { + struct BetaNeutralSpread *h = wickra_beta_neutral_spread_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid BetaNeutralSpread parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, beta_neutral_spread_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_beta_neutral_spread_update(SEXP e, SEXP a0, SEXP a1) { + struct BetaNeutralSpread *h = (struct BetaNeutralSpread *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_beta_neutral_spread_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_beta_neutral_spread_batch(SEXP e, SEXP a0, SEXP a1) { + struct BetaNeutralSpread *h = (struct BetaNeutralSpread *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_beta_neutral_spread_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_beta_neutral_spread_reset(SEXP e) { + struct BetaNeutralSpread *h = (struct BetaNeutralSpread *)R_ExternalPtrAddr(e); + wickra_beta_neutral_spread_reset(h); + return R_NilValue; +} + +static void better_volume_fin(SEXP e) { + struct BetterVolume *h = (struct BetterVolume *)R_ExternalPtrAddr(e); + if (h) wickra_better_volume_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_better_volume_new(SEXP a0) { + struct BetterVolume *h = wickra_better_volume_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid BetterVolume parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, better_volume_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_better_volume_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BetterVolume *h = (struct BetterVolume *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_better_volume_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_better_volume_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BetterVolume *h = (struct BetterVolume *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_better_volume_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_better_volume_reset(SEXP e) { + struct BetterVolume *h = (struct BetterVolume *)R_ExternalPtrAddr(e); + wickra_better_volume_reset(h); + return R_NilValue; +} + +static void bipower_variation_fin(SEXP e) { + struct BipowerVariation *h = (struct BipowerVariation *)R_ExternalPtrAddr(e); + if (h) wickra_bipower_variation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bipower_variation_new(SEXP a0) { + struct BipowerVariation *h = wickra_bipower_variation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid BipowerVariation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bipower_variation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bipower_variation_update(SEXP e, SEXP a0) { + struct BipowerVariation *h = (struct BipowerVariation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_bipower_variation_update(h, Rf_asReal(a0))); +} +SEXP wk_bipower_variation_batch(SEXP e, SEXP a0) { + struct BipowerVariation *h = (struct BipowerVariation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_bipower_variation_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_bipower_variation_reset(SEXP e) { + struct BipowerVariation *h = (struct BipowerVariation *)R_ExternalPtrAddr(e); + wickra_bipower_variation_reset(h); + return R_NilValue; +} + +static void body_size_pct_fin(SEXP e) { + struct BodySizePct *h = (struct BodySizePct *)R_ExternalPtrAddr(e); + if (h) wickra_body_size_pct_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_body_size_pct_new(void) { + struct BodySizePct *h = wickra_body_size_pct_new(); + if (!h) Rf_error("invalid BodySizePct parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, body_size_pct_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_body_size_pct_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BodySizePct *h = (struct BodySizePct *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_body_size_pct_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_body_size_pct_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct BodySizePct *h = (struct BodySizePct *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_body_size_pct_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_body_size_pct_reset(SEXP e) { + struct BodySizePct *h = (struct BodySizePct *)R_ExternalPtrAddr(e); + wickra_body_size_pct_reset(h); + return R_NilValue; +} + +static void bollinger_bands_fin(SEXP e) { + struct BollingerBands *h = (struct BollingerBands *)R_ExternalPtrAddr(e); + if (h) wickra_bollinger_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bollinger_bands_new(SEXP a0, SEXP a1) { + struct BollingerBands *h = wickra_bollinger_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid BollingerBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bollinger_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bollinger_bands_update(SEXP e, SEXP a0) { + struct BollingerBands *h = (struct BollingerBands *)R_ExternalPtrAddr(e); + struct WickraBollingerOutput out; + int ok = wickra_bollinger_bands_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + REAL(r)[3] = ok ? (double)out.stddev : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + SET_STRING_ELT(nm, 3, Rf_mkChar("stddev")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_bollinger_bands_reset(SEXP e) { + struct BollingerBands *h = (struct BollingerBands *)R_ExternalPtrAddr(e); + wickra_bollinger_bands_reset(h); + return R_NilValue; +} + +static void bollinger_bandwidth_fin(SEXP e) { + struct BollingerBandwidth *h = (struct BollingerBandwidth *)R_ExternalPtrAddr(e); + if (h) wickra_bollinger_bandwidth_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bollinger_bandwidth_new(SEXP a0, SEXP a1) { + struct BollingerBandwidth *h = wickra_bollinger_bandwidth_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid BollingerBandwidth parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bollinger_bandwidth_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bollinger_bandwidth_update(SEXP e, SEXP a0) { + struct BollingerBandwidth *h = (struct BollingerBandwidth *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_bollinger_bandwidth_update(h, Rf_asReal(a0))); +} +SEXP wk_bollinger_bandwidth_batch(SEXP e, SEXP a0) { + struct BollingerBandwidth *h = (struct BollingerBandwidth *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_bollinger_bandwidth_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_bollinger_bandwidth_reset(SEXP e) { + struct BollingerBandwidth *h = (struct BollingerBandwidth *)R_ExternalPtrAddr(e); + wickra_bollinger_bandwidth_reset(h); + return R_NilValue; +} + +static void bomar_bands_fin(SEXP e) { + struct BomarBands *h = (struct BomarBands *)R_ExternalPtrAddr(e); + if (h) wickra_bomar_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bomar_bands_new(SEXP a0, SEXP a1) { + struct BomarBands *h = wickra_bomar_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid BomarBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bomar_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bomar_bands_update(SEXP e, SEXP a0) { + struct BomarBands *h = (struct BomarBands *)R_ExternalPtrAddr(e); + struct WickraBomarBandsOutput out; + int ok = wickra_bomar_bands_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_bomar_bands_reset(SEXP e) { + struct BomarBands *h = (struct BomarBands *)R_ExternalPtrAddr(e); + wickra_bomar_bands_reset(h); + return R_NilValue; +} + +static void breadth_thrust_fin(SEXP e) { + struct BreadthThrust *h = (struct BreadthThrust *)R_ExternalPtrAddr(e); + if (h) wickra_breadth_thrust_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_breadth_thrust_new(SEXP a0) { + struct BreadthThrust *h = wickra_breadth_thrust_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid BreadthThrust parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, breadth_thrust_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_breadth_thrust_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct BreadthThrust *h = (struct BreadthThrust *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_breadth_thrust_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_breadth_thrust_reset(SEXP e) { + struct BreadthThrust *h = (struct BreadthThrust *)R_ExternalPtrAddr(e); + wickra_breadth_thrust_reset(h); + return R_NilValue; +} + +static void breakaway_fin(SEXP e) { + struct Breakaway *h = (struct Breakaway *)R_ExternalPtrAddr(e); + if (h) wickra_breakaway_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_breakaway_new(void) { + struct Breakaway *h = wickra_breakaway_new(); + if (!h) Rf_error("invalid Breakaway parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, breakaway_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_breakaway_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Breakaway *h = (struct Breakaway *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_breakaway_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_breakaway_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Breakaway *h = (struct Breakaway *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_breakaway_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_breakaway_reset(SEXP e) { + struct Breakaway *h = (struct Breakaway *)R_ExternalPtrAddr(e); + wickra_breakaway_reset(h); + return R_NilValue; +} + +static void bullish_percent_index_fin(SEXP e) { + struct BullishPercentIndex *h = (struct BullishPercentIndex *)R_ExternalPtrAddr(e); + if (h) wickra_bullish_percent_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_bullish_percent_index_new(void) { + struct BullishPercentIndex *h = wickra_bullish_percent_index_new(); + if (!h) Rf_error("invalid BullishPercentIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, bullish_percent_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_bullish_percent_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct BullishPercentIndex *h = (struct BullishPercentIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_bullish_percent_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_bullish_percent_index_reset(SEXP e) { + struct BullishPercentIndex *h = (struct BullishPercentIndex *)R_ExternalPtrAddr(e); + wickra_bullish_percent_index_reset(h); + return R_NilValue; +} + +static void burke_ratio_fin(SEXP e) { + struct BurkeRatio *h = (struct BurkeRatio *)R_ExternalPtrAddr(e); + if (h) wickra_burke_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_burke_ratio_new(SEXP a0) { + struct BurkeRatio *h = wickra_burke_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid BurkeRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, burke_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_burke_ratio_update(SEXP e, SEXP a0) { + struct BurkeRatio *h = (struct BurkeRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_burke_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_burke_ratio_batch(SEXP e, SEXP a0) { + struct BurkeRatio *h = (struct BurkeRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_burke_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_burke_ratio_reset(SEXP e) { + struct BurkeRatio *h = (struct BurkeRatio *)R_ExternalPtrAddr(e); + wickra_burke_ratio_reset(h); + return R_NilValue; +} + +static void butterfly_fin(SEXP e) { + struct Butterfly *h = (struct Butterfly *)R_ExternalPtrAddr(e); + if (h) wickra_butterfly_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_butterfly_new(void) { + struct Butterfly *h = wickra_butterfly_new(); + if (!h) Rf_error("invalid Butterfly parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, butterfly_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_butterfly_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Butterfly *h = (struct Butterfly *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_butterfly_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_butterfly_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Butterfly *h = (struct Butterfly *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_butterfly_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_butterfly_reset(SEXP e) { + struct Butterfly *h = (struct Butterfly *)R_ExternalPtrAddr(e); + wickra_butterfly_reset(h); + return R_NilValue; +} + +static void calendar_spread_fin(SEXP e) { + struct CalendarSpread *h = (struct CalendarSpread *)R_ExternalPtrAddr(e); + if (h) wickra_calendar_spread_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_calendar_spread_new(void) { + struct CalendarSpread *h = wickra_calendar_spread_new(); + if (!h) Rf_error("invalid CalendarSpread parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, calendar_spread_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_calendar_spread_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct CalendarSpread *h = (struct CalendarSpread *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_calendar_spread_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_calendar_spread_reset(SEXP e) { + struct CalendarSpread *h = (struct CalendarSpread *)R_ExternalPtrAddr(e); + wickra_calendar_spread_reset(h); + return R_NilValue; +} + +static void calmar_ratio_fin(SEXP e) { + struct CalmarRatio *h = (struct CalmarRatio *)R_ExternalPtrAddr(e); + if (h) wickra_calmar_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_calmar_ratio_new(SEXP a0) { + struct CalmarRatio *h = wickra_calmar_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CalmarRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, calmar_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_calmar_ratio_update(SEXP e, SEXP a0) { + struct CalmarRatio *h = (struct CalmarRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_calmar_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_calmar_ratio_batch(SEXP e, SEXP a0) { + struct CalmarRatio *h = (struct CalmarRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_calmar_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_calmar_ratio_reset(SEXP e) { + struct CalmarRatio *h = (struct CalmarRatio *)R_ExternalPtrAddr(e); + wickra_calmar_ratio_reset(h); + return R_NilValue; +} + +static void camarilla_fin(SEXP e) { + struct Camarilla *h = (struct Camarilla *)R_ExternalPtrAddr(e); + if (h) wickra_camarilla_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_camarilla_new(void) { + struct Camarilla *h = wickra_camarilla_new(); + if (!h) Rf_error("invalid Camarilla parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, camarilla_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_camarilla_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Camarilla *h = (struct Camarilla *)R_ExternalPtrAddr(e); + struct WickraCamarillaPivotsOutput out; + int ok = wickra_camarilla_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 9)); + REAL(r)[0] = ok ? (double)out.pp : NA_REAL; + REAL(r)[1] = ok ? (double)out.r1 : NA_REAL; + REAL(r)[2] = ok ? (double)out.r2 : NA_REAL; + REAL(r)[3] = ok ? (double)out.r3 : NA_REAL; + REAL(r)[4] = ok ? (double)out.r4 : NA_REAL; + REAL(r)[5] = ok ? (double)out.s1 : NA_REAL; + REAL(r)[6] = ok ? (double)out.s2 : NA_REAL; + REAL(r)[7] = ok ? (double)out.s3 : NA_REAL; + REAL(r)[8] = ok ? (double)out.s4 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 9)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pp")); + SET_STRING_ELT(nm, 1, Rf_mkChar("r1")); + SET_STRING_ELT(nm, 2, Rf_mkChar("r2")); + SET_STRING_ELT(nm, 3, Rf_mkChar("r3")); + SET_STRING_ELT(nm, 4, Rf_mkChar("r4")); + SET_STRING_ELT(nm, 5, Rf_mkChar("s1")); + SET_STRING_ELT(nm, 6, Rf_mkChar("s2")); + SET_STRING_ELT(nm, 7, Rf_mkChar("s3")); + SET_STRING_ELT(nm, 8, Rf_mkChar("s4")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_camarilla_reset(SEXP e) { + struct Camarilla *h = (struct Camarilla *)R_ExternalPtrAddr(e); + wickra_camarilla_reset(h); + return R_NilValue; +} + +static void candle_volume_fin(SEXP e) { + struct CandleVolume *h = (struct CandleVolume *)R_ExternalPtrAddr(e); + if (h) wickra_candle_volume_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_candle_volume_new(SEXP a0) { + struct CandleVolume *h = wickra_candle_volume_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CandleVolume parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, candle_volume_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_candle_volume_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CandleVolume *h = (struct CandleVolume *)R_ExternalPtrAddr(e); + struct WickraCandleVolumeOutput out; + int ok = wickra_candle_volume_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.body : NA_REAL; + REAL(r)[1] = ok ? (double)out.width : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("body")); + SET_STRING_ELT(nm, 1, Rf_mkChar("width")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_candle_volume_reset(SEXP e) { + struct CandleVolume *h = (struct CandleVolume *)R_ExternalPtrAddr(e); + wickra_candle_volume_reset(h); + return R_NilValue; +} + +static void cci_fin(SEXP e) { + struct Cci *h = (struct Cci *)R_ExternalPtrAddr(e); + if (h) wickra_cci_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cci_new(SEXP a0) { + struct Cci *h = wickra_cci_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Cci parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cci_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cci_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Cci *h = (struct Cci *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cci_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_cci_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Cci *h = (struct Cci *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_cci_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cci_reset(SEXP e) { + struct Cci *h = (struct Cci *)R_ExternalPtrAddr(e); + wickra_cci_reset(h); + return R_NilValue; +} + +static void center_of_gravity_fin(SEXP e) { + struct CenterOfGravity *h = (struct CenterOfGravity *)R_ExternalPtrAddr(e); + if (h) wickra_center_of_gravity_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_center_of_gravity_new(SEXP a0) { + struct CenterOfGravity *h = wickra_center_of_gravity_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CenterOfGravity parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, center_of_gravity_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_center_of_gravity_update(SEXP e, SEXP a0) { + struct CenterOfGravity *h = (struct CenterOfGravity *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_center_of_gravity_update(h, Rf_asReal(a0))); +} +SEXP wk_center_of_gravity_batch(SEXP e, SEXP a0) { + struct CenterOfGravity *h = (struct CenterOfGravity *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_center_of_gravity_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_center_of_gravity_reset(SEXP e) { + struct CenterOfGravity *h = (struct CenterOfGravity *)R_ExternalPtrAddr(e); + wickra_center_of_gravity_reset(h); + return R_NilValue; +} + +static void central_pivot_range_fin(SEXP e) { + struct CentralPivotRange *h = (struct CentralPivotRange *)R_ExternalPtrAddr(e); + if (h) wickra_central_pivot_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_central_pivot_range_new(void) { + struct CentralPivotRange *h = wickra_central_pivot_range_new(); + if (!h) Rf_error("invalid CentralPivotRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, central_pivot_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_central_pivot_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CentralPivotRange *h = (struct CentralPivotRange *)R_ExternalPtrAddr(e); + struct WickraCentralPivotRangeOutput out; + int ok = wickra_central_pivot_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.pivot : NA_REAL; + REAL(r)[1] = ok ? (double)out.tc : NA_REAL; + REAL(r)[2] = ok ? (double)out.bc : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pivot")); + SET_STRING_ELT(nm, 1, Rf_mkChar("tc")); + SET_STRING_ELT(nm, 2, Rf_mkChar("bc")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_central_pivot_range_reset(SEXP e) { + struct CentralPivotRange *h = (struct CentralPivotRange *)R_ExternalPtrAddr(e); + wickra_central_pivot_range_reset(h); + return R_NilValue; +} + +static void cfo_fin(SEXP e) { + struct Cfo *h = (struct Cfo *)R_ExternalPtrAddr(e); + if (h) wickra_cfo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cfo_new(SEXP a0) { + struct Cfo *h = wickra_cfo_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Cfo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cfo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cfo_update(SEXP e, SEXP a0) { + struct Cfo *h = (struct Cfo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cfo_update(h, Rf_asReal(a0))); +} +SEXP wk_cfo_batch(SEXP e, SEXP a0) { + struct Cfo *h = (struct Cfo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_cfo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cfo_reset(SEXP e) { + struct Cfo *h = (struct Cfo *)R_ExternalPtrAddr(e); + wickra_cfo_reset(h); + return R_NilValue; +} + +static void chaikin_money_flow_fin(SEXP e) { + struct ChaikinMoneyFlow *h = (struct ChaikinMoneyFlow *)R_ExternalPtrAddr(e); + if (h) wickra_chaikin_money_flow_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_chaikin_money_flow_new(SEXP a0) { + struct ChaikinMoneyFlow *h = wickra_chaikin_money_flow_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ChaikinMoneyFlow parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, chaikin_money_flow_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_chaikin_money_flow_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinMoneyFlow *h = (struct ChaikinMoneyFlow *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_chaikin_money_flow_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_chaikin_money_flow_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinMoneyFlow *h = (struct ChaikinMoneyFlow *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_chaikin_money_flow_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_chaikin_money_flow_reset(SEXP e) { + struct ChaikinMoneyFlow *h = (struct ChaikinMoneyFlow *)R_ExternalPtrAddr(e); + wickra_chaikin_money_flow_reset(h); + return R_NilValue; +} + +static void chaikin_oscillator_fin(SEXP e) { + struct ChaikinOscillator *h = (struct ChaikinOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_chaikin_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_chaikin_oscillator_new(SEXP a0, SEXP a1) { + struct ChaikinOscillator *h = wickra_chaikin_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid ChaikinOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, chaikin_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_chaikin_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinOscillator *h = (struct ChaikinOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_chaikin_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_chaikin_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinOscillator *h = (struct ChaikinOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_chaikin_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_chaikin_oscillator_reset(SEXP e) { + struct ChaikinOscillator *h = (struct ChaikinOscillator *)R_ExternalPtrAddr(e); + wickra_chaikin_oscillator_reset(h); + return R_NilValue; +} + +static void chaikin_volatility_fin(SEXP e) { + struct ChaikinVolatility *h = (struct ChaikinVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_chaikin_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_chaikin_volatility_new(SEXP a0, SEXP a1) { + struct ChaikinVolatility *h = wickra_chaikin_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid ChaikinVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, chaikin_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_chaikin_volatility_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinVolatility *h = (struct ChaikinVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_chaikin_volatility_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_chaikin_volatility_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChaikinVolatility *h = (struct ChaikinVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_chaikin_volatility_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_chaikin_volatility_reset(SEXP e) { + struct ChaikinVolatility *h = (struct ChaikinVolatility *)R_ExternalPtrAddr(e); + wickra_chaikin_volatility_reset(h); + return R_NilValue; +} + +static void chande_kroll_stop_fin(SEXP e) { + struct ChandeKrollStop *h = (struct ChandeKrollStop *)R_ExternalPtrAddr(e); + if (h) wickra_chande_kroll_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_chande_kroll_stop_new(SEXP a0, SEXP a1, SEXP a2) { + struct ChandeKrollStop *h = wickra_chande_kroll_stop_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid ChandeKrollStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, chande_kroll_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_chande_kroll_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChandeKrollStop *h = (struct ChandeKrollStop *)R_ExternalPtrAddr(e); + struct WickraChandeKrollStopOutput out; + int ok = wickra_chande_kroll_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.stop_long : NA_REAL; + REAL(r)[1] = ok ? (double)out.stop_short : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("stop_long")); + SET_STRING_ELT(nm, 1, Rf_mkChar("stop_short")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_chande_kroll_stop_reset(SEXP e) { + struct ChandeKrollStop *h = (struct ChandeKrollStop *)R_ExternalPtrAddr(e); + wickra_chande_kroll_stop_reset(h); + return R_NilValue; +} + +static void chandelier_exit_fin(SEXP e) { + struct ChandelierExit *h = (struct ChandelierExit *)R_ExternalPtrAddr(e); + if (h) wickra_chandelier_exit_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_chandelier_exit_new(SEXP a0, SEXP a1) { + struct ChandelierExit *h = wickra_chandelier_exit_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid ChandelierExit parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, chandelier_exit_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_chandelier_exit_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChandelierExit *h = (struct ChandelierExit *)R_ExternalPtrAddr(e); + struct WickraChandelierExitOutput out; + int ok = wickra_chandelier_exit_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.long_stop : NA_REAL; + REAL(r)[1] = ok ? (double)out.short_stop : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("long_stop")); + SET_STRING_ELT(nm, 1, Rf_mkChar("short_stop")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_chandelier_exit_reset(SEXP e) { + struct ChandelierExit *h = (struct ChandelierExit *)R_ExternalPtrAddr(e); + wickra_chandelier_exit_reset(h); + return R_NilValue; +} + +static void choppiness_index_fin(SEXP e) { + struct ChoppinessIndex *h = (struct ChoppinessIndex *)R_ExternalPtrAddr(e); + if (h) wickra_choppiness_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_choppiness_index_new(SEXP a0) { + struct ChoppinessIndex *h = wickra_choppiness_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ChoppinessIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, choppiness_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_choppiness_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChoppinessIndex *h = (struct ChoppinessIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_choppiness_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_choppiness_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ChoppinessIndex *h = (struct ChoppinessIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_choppiness_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_choppiness_index_reset(SEXP e) { + struct ChoppinessIndex *h = (struct ChoppinessIndex *)R_ExternalPtrAddr(e); + wickra_choppiness_index_reset(h); + return R_NilValue; +} + +static void classic_pivots_fin(SEXP e) { + struct ClassicPivots *h = (struct ClassicPivots *)R_ExternalPtrAddr(e); + if (h) wickra_classic_pivots_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_classic_pivots_new(void) { + struct ClassicPivots *h = wickra_classic_pivots_new(); + if (!h) Rf_error("invalid ClassicPivots parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, classic_pivots_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_classic_pivots_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ClassicPivots *h = (struct ClassicPivots *)R_ExternalPtrAddr(e); + struct WickraClassicPivotsOutput out; + int ok = wickra_classic_pivots_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 7)); + REAL(r)[0] = ok ? (double)out.pp : NA_REAL; + REAL(r)[1] = ok ? (double)out.r1 : NA_REAL; + REAL(r)[2] = ok ? (double)out.r2 : NA_REAL; + REAL(r)[3] = ok ? (double)out.r3 : NA_REAL; + REAL(r)[4] = ok ? (double)out.s1 : NA_REAL; + REAL(r)[5] = ok ? (double)out.s2 : NA_REAL; + REAL(r)[6] = ok ? (double)out.s3 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pp")); + SET_STRING_ELT(nm, 1, Rf_mkChar("r1")); + SET_STRING_ELT(nm, 2, Rf_mkChar("r2")); + SET_STRING_ELT(nm, 3, Rf_mkChar("r3")); + SET_STRING_ELT(nm, 4, Rf_mkChar("s1")); + SET_STRING_ELT(nm, 5, Rf_mkChar("s2")); + SET_STRING_ELT(nm, 6, Rf_mkChar("s3")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_classic_pivots_reset(SEXP e) { + struct ClassicPivots *h = (struct ClassicPivots *)R_ExternalPtrAddr(e); + wickra_classic_pivots_reset(h); + return R_NilValue; +} + +static void close_vs_open_fin(SEXP e) { + struct CloseVsOpen *h = (struct CloseVsOpen *)R_ExternalPtrAddr(e); + if (h) wickra_close_vs_open_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_close_vs_open_new(void) { + struct CloseVsOpen *h = wickra_close_vs_open_new(); + if (!h) Rf_error("invalid CloseVsOpen parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, close_vs_open_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_close_vs_open_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CloseVsOpen *h = (struct CloseVsOpen *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_close_vs_open_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_close_vs_open_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CloseVsOpen *h = (struct CloseVsOpen *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_close_vs_open_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_close_vs_open_reset(SEXP e) { + struct CloseVsOpen *h = (struct CloseVsOpen *)R_ExternalPtrAddr(e); + wickra_close_vs_open_reset(h); + return R_NilValue; +} + +static void closing_marubozu_fin(SEXP e) { + struct ClosingMarubozu *h = (struct ClosingMarubozu *)R_ExternalPtrAddr(e); + if (h) wickra_closing_marubozu_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_closing_marubozu_new(void) { + struct ClosingMarubozu *h = wickra_closing_marubozu_new(); + if (!h) Rf_error("invalid ClosingMarubozu parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, closing_marubozu_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_closing_marubozu_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ClosingMarubozu *h = (struct ClosingMarubozu *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_closing_marubozu_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_closing_marubozu_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ClosingMarubozu *h = (struct ClosingMarubozu *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_closing_marubozu_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_closing_marubozu_reset(SEXP e) { + struct ClosingMarubozu *h = (struct ClosingMarubozu *)R_ExternalPtrAddr(e); + wickra_closing_marubozu_reset(h); + return R_NilValue; +} + +static void cmo_fin(SEXP e) { + struct Cmo *h = (struct Cmo *)R_ExternalPtrAddr(e); + if (h) wickra_cmo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cmo_new(SEXP a0) { + struct Cmo *h = wickra_cmo_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Cmo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cmo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cmo_update(SEXP e, SEXP a0) { + struct Cmo *h = (struct Cmo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cmo_update(h, Rf_asReal(a0))); +} +SEXP wk_cmo_batch(SEXP e, SEXP a0) { + struct Cmo *h = (struct Cmo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_cmo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cmo_reset(SEXP e) { + struct Cmo *h = (struct Cmo *)R_ExternalPtrAddr(e); + wickra_cmo_reset(h); + return R_NilValue; +} + +static void coefficient_of_variation_fin(SEXP e) { + struct CoefficientOfVariation *h = (struct CoefficientOfVariation *)R_ExternalPtrAddr(e); + if (h) wickra_coefficient_of_variation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_coefficient_of_variation_new(SEXP a0) { + struct CoefficientOfVariation *h = wickra_coefficient_of_variation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CoefficientOfVariation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, coefficient_of_variation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_coefficient_of_variation_update(SEXP e, SEXP a0) { + struct CoefficientOfVariation *h = (struct CoefficientOfVariation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_coefficient_of_variation_update(h, Rf_asReal(a0))); +} +SEXP wk_coefficient_of_variation_batch(SEXP e, SEXP a0) { + struct CoefficientOfVariation *h = (struct CoefficientOfVariation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_coefficient_of_variation_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_coefficient_of_variation_reset(SEXP e) { + struct CoefficientOfVariation *h = (struct CoefficientOfVariation *)R_ExternalPtrAddr(e); + wickra_coefficient_of_variation_reset(h); + return R_NilValue; +} + +static void cointegration_fin(SEXP e) { + struct Cointegration *h = (struct Cointegration *)R_ExternalPtrAddr(e); + if (h) wickra_cointegration_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cointegration_new(SEXP a0, SEXP a1) { + struct Cointegration *h = wickra_cointegration_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Cointegration parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cointegration_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cointegration_update(SEXP e, SEXP a0, SEXP a1) { + struct Cointegration *h = (struct Cointegration *)R_ExternalPtrAddr(e); + struct WickraCointegrationOutput out; + int ok = wickra_cointegration_update(h, Rf_asReal(a0), Rf_asReal(a1), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.hedge_ratio : NA_REAL; + REAL(r)[1] = ok ? (double)out.spread : NA_REAL; + REAL(r)[2] = ok ? (double)out.adf_stat : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("hedge_ratio")); + SET_STRING_ELT(nm, 1, Rf_mkChar("spread")); + SET_STRING_ELT(nm, 2, Rf_mkChar("adf_stat")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_cointegration_reset(SEXP e) { + struct Cointegration *h = (struct Cointegration *)R_ExternalPtrAddr(e); + wickra_cointegration_reset(h); + return R_NilValue; +} + +static void common_sense_ratio_fin(SEXP e) { + struct CommonSenseRatio *h = (struct CommonSenseRatio *)R_ExternalPtrAddr(e); + if (h) wickra_common_sense_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_common_sense_ratio_new(SEXP a0) { + struct CommonSenseRatio *h = wickra_common_sense_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CommonSenseRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, common_sense_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_common_sense_ratio_update(SEXP e, SEXP a0) { + struct CommonSenseRatio *h = (struct CommonSenseRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_common_sense_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_common_sense_ratio_batch(SEXP e, SEXP a0) { + struct CommonSenseRatio *h = (struct CommonSenseRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_common_sense_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_common_sense_ratio_reset(SEXP e) { + struct CommonSenseRatio *h = (struct CommonSenseRatio *)R_ExternalPtrAddr(e); + wickra_common_sense_ratio_reset(h); + return R_NilValue; +} + +static void composite_profile_fin(SEXP e) { + struct CompositeProfile *h = (struct CompositeProfile *)R_ExternalPtrAddr(e); + if (h) wickra_composite_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_composite_profile_new(SEXP a0, SEXP a1, SEXP a2) { + struct CompositeProfile *h = wickra_composite_profile_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid CompositeProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, composite_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_composite_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CompositeProfile *h = (struct CompositeProfile *)R_ExternalPtrAddr(e); + struct WickraCompositeProfileOutput out; + int ok = wickra_composite_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.poc : NA_REAL; + REAL(r)[1] = ok ? (double)out.vah : NA_REAL; + REAL(r)[2] = ok ? (double)out.val : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("poc")); + SET_STRING_ELT(nm, 1, Rf_mkChar("vah")); + SET_STRING_ELT(nm, 2, Rf_mkChar("val")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_composite_profile_reset(SEXP e) { + struct CompositeProfile *h = (struct CompositeProfile *)R_ExternalPtrAddr(e); + wickra_composite_profile_reset(h); + return R_NilValue; +} + +static void concealing_baby_swallow_fin(SEXP e) { + struct ConcealingBabySwallow *h = (struct ConcealingBabySwallow *)R_ExternalPtrAddr(e); + if (h) wickra_concealing_baby_swallow_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_concealing_baby_swallow_new(void) { + struct ConcealingBabySwallow *h = wickra_concealing_baby_swallow_new(); + if (!h) Rf_error("invalid ConcealingBabySwallow parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, concealing_baby_swallow_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_concealing_baby_swallow_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ConcealingBabySwallow *h = (struct ConcealingBabySwallow *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_concealing_baby_swallow_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_concealing_baby_swallow_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ConcealingBabySwallow *h = (struct ConcealingBabySwallow *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_concealing_baby_swallow_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_concealing_baby_swallow_reset(SEXP e) { + struct ConcealingBabySwallow *h = (struct ConcealingBabySwallow *)R_ExternalPtrAddr(e); + wickra_concealing_baby_swallow_reset(h); + return R_NilValue; +} + +static void conditional_value_at_risk_fin(SEXP e) { + struct ConditionalValueAtRisk *h = (struct ConditionalValueAtRisk *)R_ExternalPtrAddr(e); + if (h) wickra_conditional_value_at_risk_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_conditional_value_at_risk_new(SEXP a0, SEXP a1) { + struct ConditionalValueAtRisk *h = wickra_conditional_value_at_risk_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid ConditionalValueAtRisk parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, conditional_value_at_risk_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_conditional_value_at_risk_update(SEXP e, SEXP a0) { + struct ConditionalValueAtRisk *h = (struct ConditionalValueAtRisk *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_conditional_value_at_risk_update(h, Rf_asReal(a0))); +} +SEXP wk_conditional_value_at_risk_batch(SEXP e, SEXP a0) { + struct ConditionalValueAtRisk *h = (struct ConditionalValueAtRisk *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_conditional_value_at_risk_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_conditional_value_at_risk_reset(SEXP e) { + struct ConditionalValueAtRisk *h = (struct ConditionalValueAtRisk *)R_ExternalPtrAddr(e); + wickra_conditional_value_at_risk_reset(h); + return R_NilValue; +} + +static void connors_rsi_fin(SEXP e) { + struct ConnorsRsi *h = (struct ConnorsRsi *)R_ExternalPtrAddr(e); + if (h) wickra_connors_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_connors_rsi_new(SEXP a0, SEXP a1, SEXP a2) { + struct ConnorsRsi *h = wickra_connors_rsi_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid ConnorsRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, connors_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_connors_rsi_update(SEXP e, SEXP a0) { + struct ConnorsRsi *h = (struct ConnorsRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_connors_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_connors_rsi_batch(SEXP e, SEXP a0) { + struct ConnorsRsi *h = (struct ConnorsRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_connors_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_connors_rsi_reset(SEXP e) { + struct ConnorsRsi *h = (struct ConnorsRsi *)R_ExternalPtrAddr(e); + wickra_connors_rsi_reset(h); + return R_NilValue; +} + +static void coppock_fin(SEXP e) { + struct Coppock *h = (struct Coppock *)R_ExternalPtrAddr(e); + if (h) wickra_coppock_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_coppock_new(SEXP a0, SEXP a1, SEXP a2) { + struct Coppock *h = wickra_coppock_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid Coppock parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, coppock_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_coppock_update(SEXP e, SEXP a0) { + struct Coppock *h = (struct Coppock *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_coppock_update(h, Rf_asReal(a0))); +} +SEXP wk_coppock_batch(SEXP e, SEXP a0) { + struct Coppock *h = (struct Coppock *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_coppock_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_coppock_reset(SEXP e) { + struct Coppock *h = (struct Coppock *)R_ExternalPtrAddr(e); + wickra_coppock_reset(h); + return R_NilValue; +} + +static void correlation_trend_indicator_fin(SEXP e) { + struct CorrelationTrendIndicator *h = (struct CorrelationTrendIndicator *)R_ExternalPtrAddr(e); + if (h) wickra_correlation_trend_indicator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_correlation_trend_indicator_new(SEXP a0) { + struct CorrelationTrendIndicator *h = wickra_correlation_trend_indicator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CorrelationTrendIndicator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, correlation_trend_indicator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_correlation_trend_indicator_update(SEXP e, SEXP a0) { + struct CorrelationTrendIndicator *h = (struct CorrelationTrendIndicator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_correlation_trend_indicator_update(h, Rf_asReal(a0))); +} +SEXP wk_correlation_trend_indicator_batch(SEXP e, SEXP a0) { + struct CorrelationTrendIndicator *h = (struct CorrelationTrendIndicator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_correlation_trend_indicator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_correlation_trend_indicator_reset(SEXP e) { + struct CorrelationTrendIndicator *h = (struct CorrelationTrendIndicator *)R_ExternalPtrAddr(e); + wickra_correlation_trend_indicator_reset(h); + return R_NilValue; +} + +static void counterattack_fin(SEXP e) { + struct Counterattack *h = (struct Counterattack *)R_ExternalPtrAddr(e); + if (h) wickra_counterattack_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_counterattack_new(void) { + struct Counterattack *h = wickra_counterattack_new(); + if (!h) Rf_error("invalid Counterattack parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, counterattack_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_counterattack_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Counterattack *h = (struct Counterattack *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_counterattack_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_counterattack_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Counterattack *h = (struct Counterattack *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_counterattack_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_counterattack_reset(SEXP e) { + struct Counterattack *h = (struct Counterattack *)R_ExternalPtrAddr(e); + wickra_counterattack_reset(h); + return R_NilValue; +} + +static void crab_fin(SEXP e) { + struct Crab *h = (struct Crab *)R_ExternalPtrAddr(e); + if (h) wickra_crab_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_crab_new(void) { + struct Crab *h = wickra_crab_new(); + if (!h) Rf_error("invalid Crab parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, crab_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_crab_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Crab *h = (struct Crab *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_crab_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_crab_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Crab *h = (struct Crab *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_crab_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_crab_reset(SEXP e) { + struct Crab *h = (struct Crab *)R_ExternalPtrAddr(e); + wickra_crab_reset(h); + return R_NilValue; +} + +static void cumulative_volume_delta_fin(SEXP e) { + struct CumulativeVolumeDelta *h = (struct CumulativeVolumeDelta *)R_ExternalPtrAddr(e); + if (h) wickra_cumulative_volume_delta_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cumulative_volume_delta_new(void) { + struct CumulativeVolumeDelta *h = wickra_cumulative_volume_delta_new(); + if (!h) Rf_error("invalid CumulativeVolumeDelta parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cumulative_volume_delta_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cumulative_volume_delta_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct CumulativeVolumeDelta *h = (struct CumulativeVolumeDelta *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cumulative_volume_delta_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_cumulative_volume_delta_reset(SEXP e) { + struct CumulativeVolumeDelta *h = (struct CumulativeVolumeDelta *)R_ExternalPtrAddr(e); + wickra_cumulative_volume_delta_reset(h); + return R_NilValue; +} + +static void cumulative_volume_index_fin(SEXP e) { + struct CumulativeVolumeIndex *h = (struct CumulativeVolumeIndex *)R_ExternalPtrAddr(e); + if (h) wickra_cumulative_volume_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cumulative_volume_index_new(void) { + struct CumulativeVolumeIndex *h = wickra_cumulative_volume_index_new(); + if (!h) Rf_error("invalid CumulativeVolumeIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cumulative_volume_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cumulative_volume_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct CumulativeVolumeIndex *h = (struct CumulativeVolumeIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cumulative_volume_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_cumulative_volume_index_reset(SEXP e) { + struct CumulativeVolumeIndex *h = (struct CumulativeVolumeIndex *)R_ExternalPtrAddr(e); + wickra_cumulative_volume_index_reset(h); + return R_NilValue; +} + +static void cup_and_handle_fin(SEXP e) { + struct CupAndHandle *h = (struct CupAndHandle *)R_ExternalPtrAddr(e); + if (h) wickra_cup_and_handle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cup_and_handle_new(void) { + struct CupAndHandle *h = wickra_cup_and_handle_new(); + if (!h) Rf_error("invalid CupAndHandle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cup_and_handle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cup_and_handle_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CupAndHandle *h = (struct CupAndHandle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cup_and_handle_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_cup_and_handle_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct CupAndHandle *h = (struct CupAndHandle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_cup_and_handle_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cup_and_handle_reset(SEXP e) { + struct CupAndHandle *h = (struct CupAndHandle *)R_ExternalPtrAddr(e); + wickra_cup_and_handle_reset(h); + return R_NilValue; +} + +static void cybernetic_cycle_fin(SEXP e) { + struct CyberneticCycle *h = (struct CyberneticCycle *)R_ExternalPtrAddr(e); + if (h) wickra_cybernetic_cycle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cybernetic_cycle_new(SEXP a0) { + struct CyberneticCycle *h = wickra_cybernetic_cycle_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid CyberneticCycle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cybernetic_cycle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cybernetic_cycle_update(SEXP e, SEXP a0) { + struct CyberneticCycle *h = (struct CyberneticCycle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cybernetic_cycle_update(h, Rf_asReal(a0))); +} +SEXP wk_cybernetic_cycle_batch(SEXP e, SEXP a0) { + struct CyberneticCycle *h = (struct CyberneticCycle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_cybernetic_cycle_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cybernetic_cycle_reset(SEXP e) { + struct CyberneticCycle *h = (struct CyberneticCycle *)R_ExternalPtrAddr(e); + wickra_cybernetic_cycle_reset(h); + return R_NilValue; +} + +static void cypher_fin(SEXP e) { + struct Cypher *h = (struct Cypher *)R_ExternalPtrAddr(e); + if (h) wickra_cypher_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_cypher_new(void) { + struct Cypher *h = wickra_cypher_new(); + if (!h) Rf_error("invalid Cypher parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, cypher_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_cypher_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Cypher *h = (struct Cypher *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_cypher_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_cypher_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Cypher *h = (struct Cypher *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_cypher_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_cypher_reset(SEXP e) { + struct Cypher *h = (struct Cypher *)R_ExternalPtrAddr(e); + wickra_cypher_reset(h); + return R_NilValue; +} + +static void day_of_week_profile_fin(SEXP e) { + struct DayOfWeekProfile *h = (struct DayOfWeekProfile *)R_ExternalPtrAddr(e); + if (h) wickra_day_of_week_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_day_of_week_profile_new(SEXP a0) { + struct DayOfWeekProfile *h = wickra_day_of_week_profile_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid DayOfWeekProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, day_of_week_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_day_of_week_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct DayOfWeekProfile *h = (struct DayOfWeekProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + R_xlen_t n = wickra_day_of_week_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + UNPROTECT(2); + return vv; +} +SEXP wk_day_of_week_profile_reset(SEXP e) { + struct DayOfWeekProfile *h = (struct DayOfWeekProfile *)R_ExternalPtrAddr(e); + wickra_day_of_week_profile_reset(h); + return R_NilValue; +} + +static void decycler_fin(SEXP e) { + struct Decycler *h = (struct Decycler *)R_ExternalPtrAddr(e); + if (h) wickra_decycler_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_decycler_new(SEXP a0) { + struct Decycler *h = wickra_decycler_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Decycler parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, decycler_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_decycler_update(SEXP e, SEXP a0) { + struct Decycler *h = (struct Decycler *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_decycler_update(h, Rf_asReal(a0))); +} +SEXP wk_decycler_batch(SEXP e, SEXP a0) { + struct Decycler *h = (struct Decycler *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_decycler_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_decycler_reset(SEXP e) { + struct Decycler *h = (struct Decycler *)R_ExternalPtrAddr(e); + wickra_decycler_reset(h); + return R_NilValue; +} + +static void decycler_oscillator_fin(SEXP e) { + struct DecyclerOscillator *h = (struct DecyclerOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_decycler_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_decycler_oscillator_new(SEXP a0, SEXP a1) { + struct DecyclerOscillator *h = wickra_decycler_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid DecyclerOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, decycler_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_decycler_oscillator_update(SEXP e, SEXP a0) { + struct DecyclerOscillator *h = (struct DecyclerOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_decycler_oscillator_update(h, Rf_asReal(a0))); +} +SEXP wk_decycler_oscillator_batch(SEXP e, SEXP a0) { + struct DecyclerOscillator *h = (struct DecyclerOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_decycler_oscillator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_decycler_oscillator_reset(SEXP e) { + struct DecyclerOscillator *h = (struct DecyclerOscillator *)R_ExternalPtrAddr(e); + wickra_decycler_oscillator_reset(h); + return R_NilValue; +} + +static void dema_fin(SEXP e) { + struct Dema *h = (struct Dema *)R_ExternalPtrAddr(e); + if (h) wickra_dema_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dema_new(SEXP a0) { + struct Dema *h = wickra_dema_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Dema parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dema_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dema_update(SEXP e, SEXP a0) { + struct Dema *h = (struct Dema *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dema_update(h, Rf_asReal(a0))); +} +SEXP wk_dema_batch(SEXP e, SEXP a0) { + struct Dema *h = (struct Dema *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_dema_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dema_reset(SEXP e) { + struct Dema *h = (struct Dema *)R_ExternalPtrAddr(e); + wickra_dema_reset(h); + return R_NilValue; +} + +static void demand_index_fin(SEXP e) { + struct DemandIndex *h = (struct DemandIndex *)R_ExternalPtrAddr(e); + if (h) wickra_demand_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_demand_index_new(SEXP a0) { + struct DemandIndex *h = wickra_demand_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DemandIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, demand_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_demand_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DemandIndex *h = (struct DemandIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_demand_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_demand_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DemandIndex *h = (struct DemandIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_demand_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_demand_index_reset(SEXP e) { + struct DemandIndex *h = (struct DemandIndex *)R_ExternalPtrAddr(e); + wickra_demand_index_reset(h); + return R_NilValue; +} + +static void demark_pivots_fin(SEXP e) { + struct DemarkPivots *h = (struct DemarkPivots *)R_ExternalPtrAddr(e); + if (h) wickra_demark_pivots_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_demark_pivots_new(void) { + struct DemarkPivots *h = wickra_demark_pivots_new(); + if (!h) Rf_error("invalid DemarkPivots parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, demark_pivots_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_demark_pivots_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DemarkPivots *h = (struct DemarkPivots *)R_ExternalPtrAddr(e); + struct WickraDemarkPivotsOutput out; + int ok = wickra_demark_pivots_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.pp : NA_REAL; + REAL(r)[1] = ok ? (double)out.r1 : NA_REAL; + REAL(r)[2] = ok ? (double)out.s1 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pp")); + SET_STRING_ELT(nm, 1, Rf_mkChar("r1")); + SET_STRING_ELT(nm, 2, Rf_mkChar("s1")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_demark_pivots_reset(SEXP e) { + struct DemarkPivots *h = (struct DemarkPivots *)R_ExternalPtrAddr(e); + wickra_demark_pivots_reset(h); + return R_NilValue; +} + +static void depth_slope_fin(SEXP e) { + struct DepthSlope *h = (struct DepthSlope *)R_ExternalPtrAddr(e); + if (h) wickra_depth_slope_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_depth_slope_new(void) { + struct DepthSlope *h = wickra_depth_slope_new(); + if (!h) Rf_error("invalid DepthSlope parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, depth_slope_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_depth_slope_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct DepthSlope *h = (struct DepthSlope *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_depth_slope_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_depth_slope_reset(SEXP e) { + struct DepthSlope *h = (struct DepthSlope *)R_ExternalPtrAddr(e); + wickra_depth_slope_reset(h); + return R_NilValue; +} + +static void derivative_oscillator_fin(SEXP e) { + struct DerivativeOscillator *h = (struct DerivativeOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_derivative_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_derivative_oscillator_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct DerivativeOscillator *h = wickra_derivative_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid DerivativeOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, derivative_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_derivative_oscillator_update(SEXP e, SEXP a0) { + struct DerivativeOscillator *h = (struct DerivativeOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_derivative_oscillator_update(h, Rf_asReal(a0))); +} +SEXP wk_derivative_oscillator_batch(SEXP e, SEXP a0) { + struct DerivativeOscillator *h = (struct DerivativeOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_derivative_oscillator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_derivative_oscillator_reset(SEXP e) { + struct DerivativeOscillator *h = (struct DerivativeOscillator *)R_ExternalPtrAddr(e); + wickra_derivative_oscillator_reset(h); + return R_NilValue; +} + +static void detrended_std_dev_fin(SEXP e) { + struct DetrendedStdDev *h = (struct DetrendedStdDev *)R_ExternalPtrAddr(e); + if (h) wickra_detrended_std_dev_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_detrended_std_dev_new(SEXP a0) { + struct DetrendedStdDev *h = wickra_detrended_std_dev_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DetrendedStdDev parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, detrended_std_dev_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_detrended_std_dev_update(SEXP e, SEXP a0) { + struct DetrendedStdDev *h = (struct DetrendedStdDev *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_detrended_std_dev_update(h, Rf_asReal(a0))); +} +SEXP wk_detrended_std_dev_batch(SEXP e, SEXP a0) { + struct DetrendedStdDev *h = (struct DetrendedStdDev *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_detrended_std_dev_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_detrended_std_dev_reset(SEXP e) { + struct DetrendedStdDev *h = (struct DetrendedStdDev *)R_ExternalPtrAddr(e); + wickra_detrended_std_dev_reset(h); + return R_NilValue; +} + +static void disparity_index_fin(SEXP e) { + struct DisparityIndex *h = (struct DisparityIndex *)R_ExternalPtrAddr(e); + if (h) wickra_disparity_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_disparity_index_new(SEXP a0) { + struct DisparityIndex *h = wickra_disparity_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DisparityIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, disparity_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_disparity_index_update(SEXP e, SEXP a0) { + struct DisparityIndex *h = (struct DisparityIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_disparity_index_update(h, Rf_asReal(a0))); +} +SEXP wk_disparity_index_batch(SEXP e, SEXP a0) { + struct DisparityIndex *h = (struct DisparityIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_disparity_index_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_disparity_index_reset(SEXP e) { + struct DisparityIndex *h = (struct DisparityIndex *)R_ExternalPtrAddr(e); + wickra_disparity_index_reset(h); + return R_NilValue; +} + +static void distance_ssd_fin(SEXP e) { + struct DistanceSsd *h = (struct DistanceSsd *)R_ExternalPtrAddr(e); + if (h) wickra_distance_ssd_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_distance_ssd_new(SEXP a0) { + struct DistanceSsd *h = wickra_distance_ssd_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DistanceSsd parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, distance_ssd_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_distance_ssd_update(SEXP e, SEXP a0, SEXP a1) { + struct DistanceSsd *h = (struct DistanceSsd *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_distance_ssd_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_distance_ssd_batch(SEXP e, SEXP a0, SEXP a1) { + struct DistanceSsd *h = (struct DistanceSsd *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_distance_ssd_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_distance_ssd_reset(SEXP e) { + struct DistanceSsd *h = (struct DistanceSsd *)R_ExternalPtrAddr(e); + wickra_distance_ssd_reset(h); + return R_NilValue; +} + +static void doji_fin(SEXP e) { + struct Doji *h = (struct Doji *)R_ExternalPtrAddr(e); + if (h) wickra_doji_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_doji_new(void) { + struct Doji *h = wickra_doji_new(); + if (!h) Rf_error("invalid Doji parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, doji_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_doji_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Doji *h = (struct Doji *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_doji_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_doji_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Doji *h = (struct Doji *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_doji_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_doji_reset(SEXP e) { + struct Doji *h = (struct Doji *)R_ExternalPtrAddr(e); + wickra_doji_reset(h); + return R_NilValue; +} + +static void doji_star_fin(SEXP e) { + struct DojiStar *h = (struct DojiStar *)R_ExternalPtrAddr(e); + if (h) wickra_doji_star_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_doji_star_new(void) { + struct DojiStar *h = wickra_doji_star_new(); + if (!h) Rf_error("invalid DojiStar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, doji_star_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_doji_star_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DojiStar *h = (struct DojiStar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_doji_star_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_doji_star_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DojiStar *h = (struct DojiStar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_doji_star_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_doji_star_reset(SEXP e) { + struct DojiStar *h = (struct DojiStar *)R_ExternalPtrAddr(e); + wickra_doji_star_reset(h); + return R_NilValue; +} + +static void dollar_bars_fin(SEXP e) { + struct DollarBars *h = (struct DollarBars *)R_ExternalPtrAddr(e); + if (h) wickra_dollar_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dollar_bars_new(SEXP a0) { + struct DollarBars *h = wickra_dollar_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid DollarBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dollar_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dollar_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DollarBars *h = (struct DollarBars *)R_ExternalPtrAddr(e); + struct WickraDollarBar buf[64]; + size_t n = wickra_dollar_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 6)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + REAL(r)[i + n * 3] = (double)buf[i].close; + REAL(r)[i + n * 4] = (double)buf[i].volume; + REAL(r)[i + n * 5] = (double)buf[i].dollar; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 6)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SET_STRING_ELT(cn, 3, Rf_mkChar("close")); + SET_STRING_ELT(cn, 4, Rf_mkChar("volume")); + SET_STRING_ELT(cn, 5, Rf_mkChar("dollar")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_dollar_bars_reset(SEXP e) { + struct DollarBars *h = (struct DollarBars *)R_ExternalPtrAddr(e); + wickra_dollar_bars_reset(h); + return R_NilValue; +} + +static void donchian_fin(SEXP e) { + struct Donchian *h = (struct Donchian *)R_ExternalPtrAddr(e); + if (h) wickra_donchian_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_donchian_new(SEXP a0) { + struct Donchian *h = wickra_donchian_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Donchian parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, donchian_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_donchian_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Donchian *h = (struct Donchian *)R_ExternalPtrAddr(e); + struct WickraDonchianOutput out; + int ok = wickra_donchian_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_donchian_reset(SEXP e) { + struct Donchian *h = (struct Donchian *)R_ExternalPtrAddr(e); + wickra_donchian_reset(h); + return R_NilValue; +} + +static void donchian_stop_fin(SEXP e) { + struct DonchianStop *h = (struct DonchianStop *)R_ExternalPtrAddr(e); + if (h) wickra_donchian_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_donchian_stop_new(SEXP a0) { + struct DonchianStop *h = wickra_donchian_stop_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DonchianStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, donchian_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_donchian_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DonchianStop *h = (struct DonchianStop *)R_ExternalPtrAddr(e); + struct WickraDonchianStopOutput out; + int ok = wickra_donchian_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.stop_long : NA_REAL; + REAL(r)[1] = ok ? (double)out.stop_short : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("stop_long")); + SET_STRING_ELT(nm, 1, Rf_mkChar("stop_short")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_donchian_stop_reset(SEXP e) { + struct DonchianStop *h = (struct DonchianStop *)R_ExternalPtrAddr(e); + wickra_donchian_stop_reset(h); + return R_NilValue; +} + +static void double_bollinger_fin(SEXP e) { + struct DoubleBollinger *h = (struct DoubleBollinger *)R_ExternalPtrAddr(e); + if (h) wickra_double_bollinger_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_double_bollinger_new(SEXP a0, SEXP a1, SEXP a2) { + struct DoubleBollinger *h = wickra_double_bollinger_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid DoubleBollinger parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, double_bollinger_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_double_bollinger_update(SEXP e, SEXP a0) { + struct DoubleBollinger *h = (struct DoubleBollinger *)R_ExternalPtrAddr(e); + struct WickraDoubleBollingerOutput out; + int ok = wickra_double_bollinger_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.upper_outer : NA_REAL; + REAL(r)[1] = ok ? (double)out.upper_inner : NA_REAL; + REAL(r)[2] = ok ? (double)out.middle : NA_REAL; + REAL(r)[3] = ok ? (double)out.lower_inner : NA_REAL; + REAL(r)[4] = ok ? (double)out.lower_outer : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper_outer")); + SET_STRING_ELT(nm, 1, Rf_mkChar("upper_inner")); + SET_STRING_ELT(nm, 2, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 3, Rf_mkChar("lower_inner")); + SET_STRING_ELT(nm, 4, Rf_mkChar("lower_outer")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_double_bollinger_reset(SEXP e) { + struct DoubleBollinger *h = (struct DoubleBollinger *)R_ExternalPtrAddr(e); + wickra_double_bollinger_reset(h); + return R_NilValue; +} + +static void double_top_bottom_fin(SEXP e) { + struct DoubleTopBottom *h = (struct DoubleTopBottom *)R_ExternalPtrAddr(e); + if (h) wickra_double_top_bottom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_double_top_bottom_new(void) { + struct DoubleTopBottom *h = wickra_double_top_bottom_new(); + if (!h) Rf_error("invalid DoubleTopBottom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, double_top_bottom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_double_top_bottom_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DoubleTopBottom *h = (struct DoubleTopBottom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_double_top_bottom_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_double_top_bottom_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DoubleTopBottom *h = (struct DoubleTopBottom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_double_top_bottom_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_double_top_bottom_reset(SEXP e) { + struct DoubleTopBottom *h = (struct DoubleTopBottom *)R_ExternalPtrAddr(e); + wickra_double_top_bottom_reset(h); + return R_NilValue; +} + +static void downside_gap_three_methods_fin(SEXP e) { + struct DownsideGapThreeMethods *h = (struct DownsideGapThreeMethods *)R_ExternalPtrAddr(e); + if (h) wickra_downside_gap_three_methods_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_downside_gap_three_methods_new(void) { + struct DownsideGapThreeMethods *h = wickra_downside_gap_three_methods_new(); + if (!h) Rf_error("invalid DownsideGapThreeMethods parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, downside_gap_three_methods_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_downside_gap_three_methods_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DownsideGapThreeMethods *h = (struct DownsideGapThreeMethods *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_downside_gap_three_methods_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_downside_gap_three_methods_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DownsideGapThreeMethods *h = (struct DownsideGapThreeMethods *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_downside_gap_three_methods_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_downside_gap_three_methods_reset(SEXP e) { + struct DownsideGapThreeMethods *h = (struct DownsideGapThreeMethods *)R_ExternalPtrAddr(e); + wickra_downside_gap_three_methods_reset(h); + return R_NilValue; +} + +static void dpo_fin(SEXP e) { + struct Dpo *h = (struct Dpo *)R_ExternalPtrAddr(e); + if (h) wickra_dpo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dpo_new(SEXP a0) { + struct Dpo *h = wickra_dpo_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Dpo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dpo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dpo_update(SEXP e, SEXP a0) { + struct Dpo *h = (struct Dpo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dpo_update(h, Rf_asReal(a0))); +} +SEXP wk_dpo_batch(SEXP e, SEXP a0) { + struct Dpo *h = (struct Dpo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_dpo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dpo_reset(SEXP e) { + struct Dpo *h = (struct Dpo *)R_ExternalPtrAddr(e); + wickra_dpo_reset(h); + return R_NilValue; +} + +static void dragonfly_doji_fin(SEXP e) { + struct DragonflyDoji *h = (struct DragonflyDoji *)R_ExternalPtrAddr(e); + if (h) wickra_dragonfly_doji_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dragonfly_doji_new(void) { + struct DragonflyDoji *h = wickra_dragonfly_doji_new(); + if (!h) Rf_error("invalid DragonflyDoji parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dragonfly_doji_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dragonfly_doji_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DragonflyDoji *h = (struct DragonflyDoji *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dragonfly_doji_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_dragonfly_doji_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DragonflyDoji *h = (struct DragonflyDoji *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_dragonfly_doji_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dragonfly_doji_reset(SEXP e) { + struct DragonflyDoji *h = (struct DragonflyDoji *)R_ExternalPtrAddr(e); + wickra_dragonfly_doji_reset(h); + return R_NilValue; +} + +static void drawdown_duration_fin(SEXP e) { + struct DrawdownDuration *h = (struct DrawdownDuration *)R_ExternalPtrAddr(e); + if (h) wickra_drawdown_duration_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_drawdown_duration_new(void) { + struct DrawdownDuration *h = wickra_drawdown_duration_new(); + if (!h) Rf_error("invalid DrawdownDuration parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, drawdown_duration_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_drawdown_duration_update(SEXP e, SEXP a0) { + struct DrawdownDuration *h = (struct DrawdownDuration *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_drawdown_duration_update(h, Rf_asReal(a0))); +} +SEXP wk_drawdown_duration_batch(SEXP e, SEXP a0) { + struct DrawdownDuration *h = (struct DrawdownDuration *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_drawdown_duration_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_drawdown_duration_reset(SEXP e) { + struct DrawdownDuration *h = (struct DrawdownDuration *)R_ExternalPtrAddr(e); + wickra_drawdown_duration_reset(h); + return R_NilValue; +} + +static void dumpling_top_fin(SEXP e) { + struct DumplingTop *h = (struct DumplingTop *)R_ExternalPtrAddr(e); + if (h) wickra_dumpling_top_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dumpling_top_new(SEXP a0) { + struct DumplingTop *h = wickra_dumpling_top_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DumplingTop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dumpling_top_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dumpling_top_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DumplingTop *h = (struct DumplingTop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dumpling_top_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_dumpling_top_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct DumplingTop *h = (struct DumplingTop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_dumpling_top_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dumpling_top_reset(SEXP e) { + struct DumplingTop *h = (struct DumplingTop *)R_ExternalPtrAddr(e); + wickra_dumpling_top_reset(h); + return R_NilValue; +} + +static void dx_fin(SEXP e) { + struct Dx *h = (struct Dx *)R_ExternalPtrAddr(e); + if (h) wickra_dx_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dx_new(SEXP a0) { + struct Dx *h = wickra_dx_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Dx parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dx_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dx_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Dx *h = (struct Dx *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dx_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_dx_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Dx *h = (struct Dx *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_dx_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dx_reset(SEXP e) { + struct Dx *h = (struct Dx *)R_ExternalPtrAddr(e); + wickra_dx_reset(h); + return R_NilValue; +} + +static void dynamic_momentum_index_fin(SEXP e) { + struct DynamicMomentumIndex *h = (struct DynamicMomentumIndex *)R_ExternalPtrAddr(e); + if (h) wickra_dynamic_momentum_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_dynamic_momentum_index_new(SEXP a0) { + struct DynamicMomentumIndex *h = wickra_dynamic_momentum_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid DynamicMomentumIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, dynamic_momentum_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_dynamic_momentum_index_update(SEXP e, SEXP a0) { + struct DynamicMomentumIndex *h = (struct DynamicMomentumIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_dynamic_momentum_index_update(h, Rf_asReal(a0))); +} +SEXP wk_dynamic_momentum_index_batch(SEXP e, SEXP a0) { + struct DynamicMomentumIndex *h = (struct DynamicMomentumIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_dynamic_momentum_index_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_dynamic_momentum_index_reset(SEXP e) { + struct DynamicMomentumIndex *h = (struct DynamicMomentumIndex *)R_ExternalPtrAddr(e); + wickra_dynamic_momentum_index_reset(h); + return R_NilValue; +} + +static void ease_of_movement_fin(SEXP e) { + struct EaseOfMovement *h = (struct EaseOfMovement *)R_ExternalPtrAddr(e); + if (h) wickra_ease_of_movement_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ease_of_movement_new(SEXP a0) { + struct EaseOfMovement *h = wickra_ease_of_movement_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid EaseOfMovement parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ease_of_movement_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ease_of_movement_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct EaseOfMovement *h = (struct EaseOfMovement *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ease_of_movement_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_ease_of_movement_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct EaseOfMovement *h = (struct EaseOfMovement *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_ease_of_movement_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ease_of_movement_reset(SEXP e) { + struct EaseOfMovement *h = (struct EaseOfMovement *)R_ExternalPtrAddr(e); + wickra_ease_of_movement_reset(h); + return R_NilValue; +} + +static void effective_spread_fin(SEXP e) { + struct EffectiveSpread *h = (struct EffectiveSpread *)R_ExternalPtrAddr(e); + if (h) wickra_effective_spread_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_effective_spread_new(void) { + struct EffectiveSpread *h = wickra_effective_spread_new(); + if (!h) Rf_error("invalid EffectiveSpread parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, effective_spread_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_effective_spread_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4) { + struct EffectiveSpread *h = (struct EffectiveSpread *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_effective_spread_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3), Rf_asReal(a4))); +} +SEXP wk_effective_spread_reset(SEXP e) { + struct EffectiveSpread *h = (struct EffectiveSpread *)R_ExternalPtrAddr(e); + wickra_effective_spread_reset(h); + return R_NilValue; +} + +static void ehlers_stochastic_fin(SEXP e) { + struct EhlersStochastic *h = (struct EhlersStochastic *)R_ExternalPtrAddr(e); + if (h) wickra_ehlers_stochastic_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ehlers_stochastic_new(SEXP a0) { + struct EhlersStochastic *h = wickra_ehlers_stochastic_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid EhlersStochastic parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ehlers_stochastic_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ehlers_stochastic_update(SEXP e, SEXP a0) { + struct EhlersStochastic *h = (struct EhlersStochastic *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ehlers_stochastic_update(h, Rf_asReal(a0))); +} +SEXP wk_ehlers_stochastic_batch(SEXP e, SEXP a0) { + struct EhlersStochastic *h = (struct EhlersStochastic *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ehlers_stochastic_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ehlers_stochastic_reset(SEXP e) { + struct EhlersStochastic *h = (struct EhlersStochastic *)R_ExternalPtrAddr(e); + wickra_ehlers_stochastic_reset(h); + return R_NilValue; +} + +static void ehma_fin(SEXP e) { + struct Ehma *h = (struct Ehma *)R_ExternalPtrAddr(e); + if (h) wickra_ehma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ehma_new(SEXP a0) { + struct Ehma *h = wickra_ehma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Ehma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ehma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ehma_update(SEXP e, SEXP a0) { + struct Ehma *h = (struct Ehma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ehma_update(h, Rf_asReal(a0))); +} +SEXP wk_ehma_batch(SEXP e, SEXP a0) { + struct Ehma *h = (struct Ehma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ehma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ehma_reset(SEXP e) { + struct Ehma *h = (struct Ehma *)R_ExternalPtrAddr(e); + wickra_ehma_reset(h); + return R_NilValue; +} + +static void elder_impulse_fin(SEXP e) { + struct ElderImpulse *h = (struct ElderImpulse *)R_ExternalPtrAddr(e); + if (h) wickra_elder_impulse_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_elder_impulse_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct ElderImpulse *h = wickra_elder_impulse_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid ElderImpulse parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, elder_impulse_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_elder_impulse_update(SEXP e, SEXP a0) { + struct ElderImpulse *h = (struct ElderImpulse *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_elder_impulse_update(h, Rf_asReal(a0))); +} +SEXP wk_elder_impulse_batch(SEXP e, SEXP a0) { + struct ElderImpulse *h = (struct ElderImpulse *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_elder_impulse_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_elder_impulse_reset(SEXP e) { + struct ElderImpulse *h = (struct ElderImpulse *)R_ExternalPtrAddr(e); + wickra_elder_impulse_reset(h); + return R_NilValue; +} + +static void elder_ray_fin(SEXP e) { + struct ElderRay *h = (struct ElderRay *)R_ExternalPtrAddr(e); + if (h) wickra_elder_ray_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_elder_ray_new(SEXP a0) { + struct ElderRay *h = wickra_elder_ray_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ElderRay parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, elder_ray_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_elder_ray_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ElderRay *h = (struct ElderRay *)R_ExternalPtrAddr(e); + struct WickraElderRayOutput out; + int ok = wickra_elder_ray_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.bull_power : NA_REAL; + REAL(r)[1] = ok ? (double)out.bear_power : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("bull_power")); + SET_STRING_ELT(nm, 1, Rf_mkChar("bear_power")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_elder_ray_reset(SEXP e) { + struct ElderRay *h = (struct ElderRay *)R_ExternalPtrAddr(e); + wickra_elder_ray_reset(h); + return R_NilValue; +} + +static void elder_safe_zone_fin(SEXP e) { + struct ElderSafeZone *h = (struct ElderSafeZone *)R_ExternalPtrAddr(e); + if (h) wickra_elder_safe_zone_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_elder_safe_zone_new(SEXP a0, SEXP a1) { + struct ElderSafeZone *h = wickra_elder_safe_zone_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid ElderSafeZone parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, elder_safe_zone_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_elder_safe_zone_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ElderSafeZone *h = (struct ElderSafeZone *)R_ExternalPtrAddr(e); + struct WickraElderSafeZoneOutput out; + int ok = wickra_elder_safe_zone_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_elder_safe_zone_reset(SEXP e) { + struct ElderSafeZone *h = (struct ElderSafeZone *)R_ExternalPtrAddr(e); + wickra_elder_safe_zone_reset(h); + return R_NilValue; +} + +static void ema_fin(SEXP e) { + struct Ema *h = (struct Ema *)R_ExternalPtrAddr(e); + if (h) wickra_ema_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ema_new(SEXP a0) { + struct Ema *h = wickra_ema_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Ema parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ema_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ema_update(SEXP e, SEXP a0) { + struct Ema *h = (struct Ema *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ema_update(h, Rf_asReal(a0))); +} +SEXP wk_ema_batch(SEXP e, SEXP a0) { + struct Ema *h = (struct Ema *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ema_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ema_reset(SEXP e) { + struct Ema *h = (struct Ema *)R_ExternalPtrAddr(e); + wickra_ema_reset(h); + return R_NilValue; +} + +static void empirical_mode_decomposition_fin(SEXP e) { + struct EmpiricalModeDecomposition *h = (struct EmpiricalModeDecomposition *)R_ExternalPtrAddr(e); + if (h) wickra_empirical_mode_decomposition_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_empirical_mode_decomposition_new(SEXP a0, SEXP a1) { + struct EmpiricalModeDecomposition *h = wickra_empirical_mode_decomposition_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid EmpiricalModeDecomposition parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, empirical_mode_decomposition_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_empirical_mode_decomposition_update(SEXP e, SEXP a0) { + struct EmpiricalModeDecomposition *h = (struct EmpiricalModeDecomposition *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_empirical_mode_decomposition_update(h, Rf_asReal(a0))); +} +SEXP wk_empirical_mode_decomposition_batch(SEXP e, SEXP a0) { + struct EmpiricalModeDecomposition *h = (struct EmpiricalModeDecomposition *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_empirical_mode_decomposition_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_empirical_mode_decomposition_reset(SEXP e) { + struct EmpiricalModeDecomposition *h = (struct EmpiricalModeDecomposition *)R_ExternalPtrAddr(e); + wickra_empirical_mode_decomposition_reset(h); + return R_NilValue; +} + +static void engulfing_fin(SEXP e) { + struct Engulfing *h = (struct Engulfing *)R_ExternalPtrAddr(e); + if (h) wickra_engulfing_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_engulfing_new(void) { + struct Engulfing *h = wickra_engulfing_new(); + if (!h) Rf_error("invalid Engulfing parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, engulfing_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_engulfing_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Engulfing *h = (struct Engulfing *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_engulfing_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_engulfing_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Engulfing *h = (struct Engulfing *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_engulfing_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_engulfing_reset(SEXP e) { + struct Engulfing *h = (struct Engulfing *)R_ExternalPtrAddr(e); + wickra_engulfing_reset(h); + return R_NilValue; +} + +static void equivolume_fin(SEXP e) { + struct Equivolume *h = (struct Equivolume *)R_ExternalPtrAddr(e); + if (h) wickra_equivolume_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_equivolume_new(SEXP a0) { + struct Equivolume *h = wickra_equivolume_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Equivolume parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, equivolume_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_equivolume_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Equivolume *h = (struct Equivolume *)R_ExternalPtrAddr(e); + struct WickraEquivolumeOutput out; + int ok = wickra_equivolume_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.height : NA_REAL; + REAL(r)[1] = ok ? (double)out.width : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("height")); + SET_STRING_ELT(nm, 1, Rf_mkChar("width")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_equivolume_reset(SEXP e) { + struct Equivolume *h = (struct Equivolume *)R_ExternalPtrAddr(e); + wickra_equivolume_reset(h); + return R_NilValue; +} + +static void estimated_leverage_ratio_fin(SEXP e) { + struct EstimatedLeverageRatio *h = (struct EstimatedLeverageRatio *)R_ExternalPtrAddr(e); + if (h) wickra_estimated_leverage_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_estimated_leverage_ratio_new(void) { + struct EstimatedLeverageRatio *h = wickra_estimated_leverage_ratio_new(); + if (!h) Rf_error("invalid EstimatedLeverageRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, estimated_leverage_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_estimated_leverage_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct EstimatedLeverageRatio *h = (struct EstimatedLeverageRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_estimated_leverage_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_estimated_leverage_ratio_reset(SEXP e) { + struct EstimatedLeverageRatio *h = (struct EstimatedLeverageRatio *)R_ExternalPtrAddr(e); + wickra_estimated_leverage_ratio_reset(h); + return R_NilValue; +} + +static void even_better_sinewave_fin(SEXP e) { + struct EvenBetterSinewave *h = (struct EvenBetterSinewave *)R_ExternalPtrAddr(e); + if (h) wickra_even_better_sinewave_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_even_better_sinewave_new(SEXP a0, SEXP a1) { + struct EvenBetterSinewave *h = wickra_even_better_sinewave_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid EvenBetterSinewave parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, even_better_sinewave_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_even_better_sinewave_update(SEXP e, SEXP a0) { + struct EvenBetterSinewave *h = (struct EvenBetterSinewave *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_even_better_sinewave_update(h, Rf_asReal(a0))); +} +SEXP wk_even_better_sinewave_batch(SEXP e, SEXP a0) { + struct EvenBetterSinewave *h = (struct EvenBetterSinewave *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_even_better_sinewave_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_even_better_sinewave_reset(SEXP e) { + struct EvenBetterSinewave *h = (struct EvenBetterSinewave *)R_ExternalPtrAddr(e); + wickra_even_better_sinewave_reset(h); + return R_NilValue; +} + +static void evening_doji_star_fin(SEXP e) { + struct EveningDojiStar *h = (struct EveningDojiStar *)R_ExternalPtrAddr(e); + if (h) wickra_evening_doji_star_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_evening_doji_star_new(void) { + struct EveningDojiStar *h = wickra_evening_doji_star_new(); + if (!h) Rf_error("invalid EveningDojiStar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, evening_doji_star_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_evening_doji_star_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct EveningDojiStar *h = (struct EveningDojiStar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_evening_doji_star_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_evening_doji_star_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct EveningDojiStar *h = (struct EveningDojiStar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_evening_doji_star_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_evening_doji_star_reset(SEXP e) { + struct EveningDojiStar *h = (struct EveningDojiStar *)R_ExternalPtrAddr(e); + wickra_evening_doji_star_reset(h); + return R_NilValue; +} + +static void evwma_fin(SEXP e) { + struct Evwma *h = (struct Evwma *)R_ExternalPtrAddr(e); + if (h) wickra_evwma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_evwma_new(SEXP a0) { + struct Evwma *h = wickra_evwma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Evwma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, evwma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_evwma_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Evwma *h = (struct Evwma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_evwma_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_evwma_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Evwma *h = (struct Evwma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_evwma_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_evwma_reset(SEXP e) { + struct Evwma *h = (struct Evwma *)R_ExternalPtrAddr(e); + wickra_evwma_reset(h); + return R_NilValue; +} + +static void ewma_volatility_fin(SEXP e) { + struct EwmaVolatility *h = (struct EwmaVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_ewma_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ewma_volatility_new(SEXP a0) { + struct EwmaVolatility *h = wickra_ewma_volatility_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid EwmaVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ewma_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ewma_volatility_update(SEXP e, SEXP a0) { + struct EwmaVolatility *h = (struct EwmaVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ewma_volatility_update(h, Rf_asReal(a0))); +} +SEXP wk_ewma_volatility_batch(SEXP e, SEXP a0) { + struct EwmaVolatility *h = (struct EwmaVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ewma_volatility_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ewma_volatility_reset(SEXP e) { + struct EwmaVolatility *h = (struct EwmaVolatility *)R_ExternalPtrAddr(e); + wickra_ewma_volatility_reset(h); + return R_NilValue; +} + +static void expectancy_fin(SEXP e) { + struct Expectancy *h = (struct Expectancy *)R_ExternalPtrAddr(e); + if (h) wickra_expectancy_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_expectancy_new(SEXP a0) { + struct Expectancy *h = wickra_expectancy_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Expectancy parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, expectancy_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_expectancy_update(SEXP e, SEXP a0) { + struct Expectancy *h = (struct Expectancy *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_expectancy_update(h, Rf_asReal(a0))); +} +SEXP wk_expectancy_batch(SEXP e, SEXP a0) { + struct Expectancy *h = (struct Expectancy *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_expectancy_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_expectancy_reset(SEXP e) { + struct Expectancy *h = (struct Expectancy *)R_ExternalPtrAddr(e); + wickra_expectancy_reset(h); + return R_NilValue; +} + +static void falling_three_methods_fin(SEXP e) { + struct FallingThreeMethods *h = (struct FallingThreeMethods *)R_ExternalPtrAddr(e); + if (h) wickra_falling_three_methods_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_falling_three_methods_new(void) { + struct FallingThreeMethods *h = wickra_falling_three_methods_new(); + if (!h) Rf_error("invalid FallingThreeMethods parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, falling_three_methods_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_falling_three_methods_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FallingThreeMethods *h = (struct FallingThreeMethods *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_falling_three_methods_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_falling_three_methods_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FallingThreeMethods *h = (struct FallingThreeMethods *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_falling_three_methods_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_falling_three_methods_reset(SEXP e) { + struct FallingThreeMethods *h = (struct FallingThreeMethods *)R_ExternalPtrAddr(e); + wickra_falling_three_methods_reset(h); + return R_NilValue; +} + +static void fama_fin(SEXP e) { + struct Fama *h = (struct Fama *)R_ExternalPtrAddr(e); + if (h) wickra_fama_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fama_new(SEXP a0, SEXP a1) { + struct Fama *h = wickra_fama_new(Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid Fama parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fama_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fama_update(SEXP e, SEXP a0) { + struct Fama *h = (struct Fama *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_fama_update(h, Rf_asReal(a0))); +} +SEXP wk_fama_batch(SEXP e, SEXP a0) { + struct Fama *h = (struct Fama *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_fama_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_fama_reset(SEXP e) { + struct Fama *h = (struct Fama *)R_ExternalPtrAddr(e); + wickra_fama_reset(h); + return R_NilValue; +} + +static void fib_arcs_fin(SEXP e) { + struct FibArcs *h = (struct FibArcs *)R_ExternalPtrAddr(e); + if (h) wickra_fib_arcs_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_arcs_new(void) { + struct FibArcs *h = wickra_fib_arcs_new(); + if (!h) Rf_error("invalid FibArcs parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_arcs_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_arcs_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibArcs *h = (struct FibArcs *)R_ExternalPtrAddr(e); + struct WickraFibArcsOutput out; + int ok = wickra_fib_arcs_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.arc_382 : NA_REAL; + REAL(r)[1] = ok ? (double)out.arc_500 : NA_REAL; + REAL(r)[2] = ok ? (double)out.arc_618 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("arc_382")); + SET_STRING_ELT(nm, 1, Rf_mkChar("arc_500")); + SET_STRING_ELT(nm, 2, Rf_mkChar("arc_618")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_arcs_reset(SEXP e) { + struct FibArcs *h = (struct FibArcs *)R_ExternalPtrAddr(e); + wickra_fib_arcs_reset(h); + return R_NilValue; +} + +static void fib_channel_fin(SEXP e) { + struct FibChannel *h = (struct FibChannel *)R_ExternalPtrAddr(e); + if (h) wickra_fib_channel_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_channel_new(void) { + struct FibChannel *h = wickra_fib_channel_new(); + if (!h) Rf_error("invalid FibChannel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_channel_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_channel_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibChannel *h = (struct FibChannel *)R_ExternalPtrAddr(e); + struct WickraFibChannelOutput out; + int ok = wickra_fib_channel_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.base : NA_REAL; + REAL(r)[1] = ok ? (double)out.level_618 : NA_REAL; + REAL(r)[2] = ok ? (double)out.level_1000 : NA_REAL; + REAL(r)[3] = ok ? (double)out.level_1618 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("base")); + SET_STRING_ELT(nm, 1, Rf_mkChar("level_618")); + SET_STRING_ELT(nm, 2, Rf_mkChar("level_1000")); + SET_STRING_ELT(nm, 3, Rf_mkChar("level_1618")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_channel_reset(SEXP e) { + struct FibChannel *h = (struct FibChannel *)R_ExternalPtrAddr(e); + wickra_fib_channel_reset(h); + return R_NilValue; +} + +static void fib_confluence_fin(SEXP e) { + struct FibConfluence *h = (struct FibConfluence *)R_ExternalPtrAddr(e); + if (h) wickra_fib_confluence_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_confluence_new(void) { + struct FibConfluence *h = wickra_fib_confluence_new(); + if (!h) Rf_error("invalid FibConfluence parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_confluence_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_confluence_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibConfluence *h = (struct FibConfluence *)R_ExternalPtrAddr(e); + struct WickraFibConfluenceOutput out; + int ok = wickra_fib_confluence_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.price : NA_REAL; + REAL(r)[1] = ok ? (double)out.strength : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("price")); + SET_STRING_ELT(nm, 1, Rf_mkChar("strength")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_confluence_reset(SEXP e) { + struct FibConfluence *h = (struct FibConfluence *)R_ExternalPtrAddr(e); + wickra_fib_confluence_reset(h); + return R_NilValue; +} + +static void fib_extension_fin(SEXP e) { + struct FibExtension *h = (struct FibExtension *)R_ExternalPtrAddr(e); + if (h) wickra_fib_extension_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_extension_new(void) { + struct FibExtension *h = wickra_fib_extension_new(); + if (!h) Rf_error("invalid FibExtension parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_extension_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_extension_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibExtension *h = (struct FibExtension *)R_ExternalPtrAddr(e); + struct WickraFibExtensionOutput out; + int ok = wickra_fib_extension_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.level_1272 : NA_REAL; + REAL(r)[1] = ok ? (double)out.level_1414 : NA_REAL; + REAL(r)[2] = ok ? (double)out.level_1618 : NA_REAL; + REAL(r)[3] = ok ? (double)out.level_2000 : NA_REAL; + REAL(r)[4] = ok ? (double)out.level_2618 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("level_1272")); + SET_STRING_ELT(nm, 1, Rf_mkChar("level_1414")); + SET_STRING_ELT(nm, 2, Rf_mkChar("level_1618")); + SET_STRING_ELT(nm, 3, Rf_mkChar("level_2000")); + SET_STRING_ELT(nm, 4, Rf_mkChar("level_2618")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_extension_reset(SEXP e) { + struct FibExtension *h = (struct FibExtension *)R_ExternalPtrAddr(e); + wickra_fib_extension_reset(h); + return R_NilValue; +} + +static void fib_fan_fin(SEXP e) { + struct FibFan *h = (struct FibFan *)R_ExternalPtrAddr(e); + if (h) wickra_fib_fan_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_fan_new(void) { + struct FibFan *h = wickra_fib_fan_new(); + if (!h) Rf_error("invalid FibFan parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_fan_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_fan_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibFan *h = (struct FibFan *)R_ExternalPtrAddr(e); + struct WickraFibFanOutput out; + int ok = wickra_fib_fan_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.fan_382 : NA_REAL; + REAL(r)[1] = ok ? (double)out.fan_500 : NA_REAL; + REAL(r)[2] = ok ? (double)out.fan_618 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("fan_382")); + SET_STRING_ELT(nm, 1, Rf_mkChar("fan_500")); + SET_STRING_ELT(nm, 2, Rf_mkChar("fan_618")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_fan_reset(SEXP e) { + struct FibFan *h = (struct FibFan *)R_ExternalPtrAddr(e); + wickra_fib_fan_reset(h); + return R_NilValue; +} + +static void fib_projection_fin(SEXP e) { + struct FibProjection *h = (struct FibProjection *)R_ExternalPtrAddr(e); + if (h) wickra_fib_projection_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_projection_new(void) { + struct FibProjection *h = wickra_fib_projection_new(); + if (!h) Rf_error("invalid FibProjection parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_projection_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_projection_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibProjection *h = (struct FibProjection *)R_ExternalPtrAddr(e); + struct WickraFibProjectionOutput out; + int ok = wickra_fib_projection_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.level_618 : NA_REAL; + REAL(r)[1] = ok ? (double)out.level_1000 : NA_REAL; + REAL(r)[2] = ok ? (double)out.level_1618 : NA_REAL; + REAL(r)[3] = ok ? (double)out.level_2618 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("level_618")); + SET_STRING_ELT(nm, 1, Rf_mkChar("level_1000")); + SET_STRING_ELT(nm, 2, Rf_mkChar("level_1618")); + SET_STRING_ELT(nm, 3, Rf_mkChar("level_2618")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_projection_reset(SEXP e) { + struct FibProjection *h = (struct FibProjection *)R_ExternalPtrAddr(e); + wickra_fib_projection_reset(h); + return R_NilValue; +} + +static void fib_retracement_fin(SEXP e) { + struct FibRetracement *h = (struct FibRetracement *)R_ExternalPtrAddr(e); + if (h) wickra_fib_retracement_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_retracement_new(void) { + struct FibRetracement *h = wickra_fib_retracement_new(); + if (!h) Rf_error("invalid FibRetracement parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_retracement_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_retracement_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibRetracement *h = (struct FibRetracement *)R_ExternalPtrAddr(e); + struct WickraFibRetracementOutput out; + int ok = wickra_fib_retracement_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 7)); + REAL(r)[0] = ok ? (double)out.level_0 : NA_REAL; + REAL(r)[1] = ok ? (double)out.level_236 : NA_REAL; + REAL(r)[2] = ok ? (double)out.level_382 : NA_REAL; + REAL(r)[3] = ok ? (double)out.level_500 : NA_REAL; + REAL(r)[4] = ok ? (double)out.level_618 : NA_REAL; + REAL(r)[5] = ok ? (double)out.level_786 : NA_REAL; + REAL(r)[6] = ok ? (double)out.level_1000 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(nm, 0, Rf_mkChar("level_0")); + SET_STRING_ELT(nm, 1, Rf_mkChar("level_236")); + SET_STRING_ELT(nm, 2, Rf_mkChar("level_382")); + SET_STRING_ELT(nm, 3, Rf_mkChar("level_500")); + SET_STRING_ELT(nm, 4, Rf_mkChar("level_618")); + SET_STRING_ELT(nm, 5, Rf_mkChar("level_786")); + SET_STRING_ELT(nm, 6, Rf_mkChar("level_1000")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_retracement_reset(SEXP e) { + struct FibRetracement *h = (struct FibRetracement *)R_ExternalPtrAddr(e); + wickra_fib_retracement_reset(h); + return R_NilValue; +} + +static void fib_time_zones_fin(SEXP e) { + struct FibTimeZones *h = (struct FibTimeZones *)R_ExternalPtrAddr(e); + if (h) wickra_fib_time_zones_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fib_time_zones_new(void) { + struct FibTimeZones *h = wickra_fib_time_zones_new(); + if (!h) Rf_error("invalid FibTimeZones parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fib_time_zones_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fib_time_zones_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibTimeZones *h = (struct FibTimeZones *)R_ExternalPtrAddr(e); + struct WickraFibTimeZonesOutput out; + int ok = wickra_fib_time_zones_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.on_zone : NA_REAL; + REAL(r)[1] = ok ? (double)out.bars_to_next : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("on_zone")); + SET_STRING_ELT(nm, 1, Rf_mkChar("bars_to_next")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fib_time_zones_reset(SEXP e) { + struct FibTimeZones *h = (struct FibTimeZones *)R_ExternalPtrAddr(e); + wickra_fib_time_zones_reset(h); + return R_NilValue; +} + +static void fibonacci_pivots_fin(SEXP e) { + struct FibonacciPivots *h = (struct FibonacciPivots *)R_ExternalPtrAddr(e); + if (h) wickra_fibonacci_pivots_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fibonacci_pivots_new(void) { + struct FibonacciPivots *h = wickra_fibonacci_pivots_new(); + if (!h) Rf_error("invalid FibonacciPivots parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fibonacci_pivots_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fibonacci_pivots_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FibonacciPivots *h = (struct FibonacciPivots *)R_ExternalPtrAddr(e); + struct WickraFibonacciPivotsOutput out; + int ok = wickra_fibonacci_pivots_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 7)); + REAL(r)[0] = ok ? (double)out.pp : NA_REAL; + REAL(r)[1] = ok ? (double)out.r1 : NA_REAL; + REAL(r)[2] = ok ? (double)out.r2 : NA_REAL; + REAL(r)[3] = ok ? (double)out.r3 : NA_REAL; + REAL(r)[4] = ok ? (double)out.s1 : NA_REAL; + REAL(r)[5] = ok ? (double)out.s2 : NA_REAL; + REAL(r)[6] = ok ? (double)out.s3 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 7)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pp")); + SET_STRING_ELT(nm, 1, Rf_mkChar("r1")); + SET_STRING_ELT(nm, 2, Rf_mkChar("r2")); + SET_STRING_ELT(nm, 3, Rf_mkChar("r3")); + SET_STRING_ELT(nm, 4, Rf_mkChar("s1")); + SET_STRING_ELT(nm, 5, Rf_mkChar("s2")); + SET_STRING_ELT(nm, 6, Rf_mkChar("s3")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fibonacci_pivots_reset(SEXP e) { + struct FibonacciPivots *h = (struct FibonacciPivots *)R_ExternalPtrAddr(e); + wickra_fibonacci_pivots_reset(h); + return R_NilValue; +} + +static void fisher_rsi_fin(SEXP e) { + struct FisherRsi *h = (struct FisherRsi *)R_ExternalPtrAddr(e); + if (h) wickra_fisher_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fisher_rsi_new(SEXP a0) { + struct FisherRsi *h = wickra_fisher_rsi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FisherRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fisher_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fisher_rsi_update(SEXP e, SEXP a0) { + struct FisherRsi *h = (struct FisherRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_fisher_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_fisher_rsi_batch(SEXP e, SEXP a0) { + struct FisherRsi *h = (struct FisherRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_fisher_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_fisher_rsi_reset(SEXP e) { + struct FisherRsi *h = (struct FisherRsi *)R_ExternalPtrAddr(e); + wickra_fisher_rsi_reset(h); + return R_NilValue; +} + +static void fisher_transform_fin(SEXP e) { + struct FisherTransform *h = (struct FisherTransform *)R_ExternalPtrAddr(e); + if (h) wickra_fisher_transform_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fisher_transform_new(SEXP a0) { + struct FisherTransform *h = wickra_fisher_transform_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FisherTransform parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fisher_transform_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fisher_transform_update(SEXP e, SEXP a0) { + struct FisherTransform *h = (struct FisherTransform *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_fisher_transform_update(h, Rf_asReal(a0))); +} +SEXP wk_fisher_transform_batch(SEXP e, SEXP a0) { + struct FisherTransform *h = (struct FisherTransform *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_fisher_transform_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_fisher_transform_reset(SEXP e) { + struct FisherTransform *h = (struct FisherTransform *)R_ExternalPtrAddr(e); + wickra_fisher_transform_reset(h); + return R_NilValue; +} + +static void flag_pennant_fin(SEXP e) { + struct FlagPennant *h = (struct FlagPennant *)R_ExternalPtrAddr(e); + if (h) wickra_flag_pennant_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_flag_pennant_new(void) { + struct FlagPennant *h = wickra_flag_pennant_new(); + if (!h) Rf_error("invalid FlagPennant parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, flag_pennant_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_flag_pennant_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FlagPennant *h = (struct FlagPennant *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_flag_pennant_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_flag_pennant_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FlagPennant *h = (struct FlagPennant *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_flag_pennant_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_flag_pennant_reset(SEXP e) { + struct FlagPennant *h = (struct FlagPennant *)R_ExternalPtrAddr(e); + wickra_flag_pennant_reset(h); + return R_NilValue; +} + +static void footprint_fin(SEXP e) { + struct Footprint *h = (struct Footprint *)R_ExternalPtrAddr(e); + if (h) wickra_footprint_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_footprint_new(SEXP a0) { + struct Footprint *h = wickra_footprint_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid Footprint parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, footprint_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_footprint_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Footprint *h = (struct Footprint *)R_ExternalPtrAddr(e); + struct WickraFootprintLevel buf[64]; + size_t n = wickra_footprint_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].price; + REAL(r)[i + n * 1] = (double)buf[i].bid_vol; + REAL(r)[i + n * 2] = (double)buf[i].ask_vol; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("price")); + SET_STRING_ELT(cn, 1, Rf_mkChar("bid_vol")); + SET_STRING_ELT(cn, 2, Rf_mkChar("ask_vol")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_footprint_reset(SEXP e) { + struct Footprint *h = (struct Footprint *)R_ExternalPtrAddr(e); + wickra_footprint_reset(h); + return R_NilValue; +} + +static void force_index_fin(SEXP e) { + struct ForceIndex *h = (struct ForceIndex *)R_ExternalPtrAddr(e); + if (h) wickra_force_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_force_index_new(SEXP a0) { + struct ForceIndex *h = wickra_force_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ForceIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, force_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_force_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ForceIndex *h = (struct ForceIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_force_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_force_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ForceIndex *h = (struct ForceIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_force_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_force_index_reset(SEXP e) { + struct ForceIndex *h = (struct ForceIndex *)R_ExternalPtrAddr(e); + wickra_force_index_reset(h); + return R_NilValue; +} + +static void fractal_chaos_bands_fin(SEXP e) { + struct FractalChaosBands *h = (struct FractalChaosBands *)R_ExternalPtrAddr(e); + if (h) wickra_fractal_chaos_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fractal_chaos_bands_new(SEXP a0) { + struct FractalChaosBands *h = wickra_fractal_chaos_bands_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FractalChaosBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fractal_chaos_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fractal_chaos_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FractalChaosBands *h = (struct FractalChaosBands *)R_ExternalPtrAddr(e); + struct WickraFractalChaosBandsOutput out; + int ok = wickra_fractal_chaos_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_fractal_chaos_bands_reset(SEXP e) { + struct FractalChaosBands *h = (struct FractalChaosBands *)R_ExternalPtrAddr(e); + wickra_fractal_chaos_bands_reset(h); + return R_NilValue; +} + +static void frama_fin(SEXP e) { + struct Frama *h = (struct Frama *)R_ExternalPtrAddr(e); + if (h) wickra_frama_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_frama_new(SEXP a0) { + struct Frama *h = wickra_frama_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Frama parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, frama_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_frama_update(SEXP e, SEXP a0) { + struct Frama *h = (struct Frama *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_frama_update(h, Rf_asReal(a0))); +} +SEXP wk_frama_batch(SEXP e, SEXP a0) { + struct Frama *h = (struct Frama *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_frama_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_frama_reset(SEXP e) { + struct Frama *h = (struct Frama *)R_ExternalPtrAddr(e); + wickra_frama_reset(h); + return R_NilValue; +} + +static void fry_pan_bottom_fin(SEXP e) { + struct FryPanBottom *h = (struct FryPanBottom *)R_ExternalPtrAddr(e); + if (h) wickra_fry_pan_bottom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_fry_pan_bottom_new(SEXP a0) { + struct FryPanBottom *h = wickra_fry_pan_bottom_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FryPanBottom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, fry_pan_bottom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_fry_pan_bottom_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FryPanBottom *h = (struct FryPanBottom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_fry_pan_bottom_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_fry_pan_bottom_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct FryPanBottom *h = (struct FryPanBottom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_fry_pan_bottom_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_fry_pan_bottom_reset(SEXP e) { + struct FryPanBottom *h = (struct FryPanBottom *)R_ExternalPtrAddr(e); + wickra_fry_pan_bottom_reset(h); + return R_NilValue; +} + +static void funding_basis_fin(SEXP e) { + struct FundingBasis *h = (struct FundingBasis *)R_ExternalPtrAddr(e); + if (h) wickra_funding_basis_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_funding_basis_new(void) { + struct FundingBasis *h = wickra_funding_basis_new(); + if (!h) Rf_error("invalid FundingBasis parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, funding_basis_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_funding_basis_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct FundingBasis *h = (struct FundingBasis *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_funding_basis_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_funding_basis_reset(SEXP e) { + struct FundingBasis *h = (struct FundingBasis *)R_ExternalPtrAddr(e); + wickra_funding_basis_reset(h); + return R_NilValue; +} + +static void funding_implied_apr_fin(SEXP e) { + struct FundingImpliedApr *h = (struct FundingImpliedApr *)R_ExternalPtrAddr(e); + if (h) wickra_funding_implied_apr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_funding_implied_apr_new(SEXP a0) { + struct FundingImpliedApr *h = wickra_funding_implied_apr_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid FundingImpliedApr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, funding_implied_apr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_funding_implied_apr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct FundingImpliedApr *h = (struct FundingImpliedApr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_funding_implied_apr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_funding_implied_apr_reset(SEXP e) { + struct FundingImpliedApr *h = (struct FundingImpliedApr *)R_ExternalPtrAddr(e); + wickra_funding_implied_apr_reset(h); + return R_NilValue; +} + +static void funding_rate_fin(SEXP e) { + struct FundingRate *h = (struct FundingRate *)R_ExternalPtrAddr(e); + if (h) wickra_funding_rate_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_funding_rate_new(void) { + struct FundingRate *h = wickra_funding_rate_new(); + if (!h) Rf_error("invalid FundingRate parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, funding_rate_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_funding_rate_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct FundingRate *h = (struct FundingRate *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_funding_rate_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_funding_rate_reset(SEXP e) { + struct FundingRate *h = (struct FundingRate *)R_ExternalPtrAddr(e); + wickra_funding_rate_reset(h); + return R_NilValue; +} + +static void funding_rate_mean_fin(SEXP e) { + struct FundingRateMean *h = (struct FundingRateMean *)R_ExternalPtrAddr(e); + if (h) wickra_funding_rate_mean_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_funding_rate_mean_new(SEXP a0) { + struct FundingRateMean *h = wickra_funding_rate_mean_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FundingRateMean parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, funding_rate_mean_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_funding_rate_mean_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct FundingRateMean *h = (struct FundingRateMean *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_funding_rate_mean_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_funding_rate_mean_reset(SEXP e) { + struct FundingRateMean *h = (struct FundingRateMean *)R_ExternalPtrAddr(e); + wickra_funding_rate_mean_reset(h); + return R_NilValue; +} + +static void funding_rate_z_score_fin(SEXP e) { + struct FundingRateZScore *h = (struct FundingRateZScore *)R_ExternalPtrAddr(e); + if (h) wickra_funding_rate_z_score_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_funding_rate_z_score_new(SEXP a0) { + struct FundingRateZScore *h = wickra_funding_rate_z_score_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid FundingRateZScore parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, funding_rate_z_score_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_funding_rate_z_score_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct FundingRateZScore *h = (struct FundingRateZScore *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_funding_rate_z_score_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_funding_rate_z_score_reset(SEXP e) { + struct FundingRateZScore *h = (struct FundingRateZScore *)R_ExternalPtrAddr(e); + wickra_funding_rate_z_score_reset(h); + return R_NilValue; +} + +static void gain_loss_ratio_fin(SEXP e) { + struct GainLossRatio *h = (struct GainLossRatio *)R_ExternalPtrAddr(e); + if (h) wickra_gain_loss_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gain_loss_ratio_new(SEXP a0) { + struct GainLossRatio *h = wickra_gain_loss_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid GainLossRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gain_loss_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gain_loss_ratio_update(SEXP e, SEXP a0) { + struct GainLossRatio *h = (struct GainLossRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_gain_loss_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_gain_loss_ratio_batch(SEXP e, SEXP a0) { + struct GainLossRatio *h = (struct GainLossRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_gain_loss_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_gain_loss_ratio_reset(SEXP e) { + struct GainLossRatio *h = (struct GainLossRatio *)R_ExternalPtrAddr(e); + wickra_gain_loss_ratio_reset(h); + return R_NilValue; +} + +static void gain_to_pain_ratio_fin(SEXP e) { + struct GainToPainRatio *h = (struct GainToPainRatio *)R_ExternalPtrAddr(e); + if (h) wickra_gain_to_pain_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gain_to_pain_ratio_new(SEXP a0) { + struct GainToPainRatio *h = wickra_gain_to_pain_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid GainToPainRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gain_to_pain_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gain_to_pain_ratio_update(SEXP e, SEXP a0) { + struct GainToPainRatio *h = (struct GainToPainRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_gain_to_pain_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_gain_to_pain_ratio_batch(SEXP e, SEXP a0) { + struct GainToPainRatio *h = (struct GainToPainRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_gain_to_pain_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_gain_to_pain_ratio_reset(SEXP e) { + struct GainToPainRatio *h = (struct GainToPainRatio *)R_ExternalPtrAddr(e); + wickra_gain_to_pain_ratio_reset(h); + return R_NilValue; +} + +static void gap_side_by_side_white_fin(SEXP e) { + struct GapSideBySideWhite *h = (struct GapSideBySideWhite *)R_ExternalPtrAddr(e); + if (h) wickra_gap_side_by_side_white_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gap_side_by_side_white_new(void) { + struct GapSideBySideWhite *h = wickra_gap_side_by_side_white_new(); + if (!h) Rf_error("invalid GapSideBySideWhite parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gap_side_by_side_white_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gap_side_by_side_white_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GapSideBySideWhite *h = (struct GapSideBySideWhite *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_gap_side_by_side_white_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_gap_side_by_side_white_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GapSideBySideWhite *h = (struct GapSideBySideWhite *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_gap_side_by_side_white_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_gap_side_by_side_white_reset(SEXP e) { + struct GapSideBySideWhite *h = (struct GapSideBySideWhite *)R_ExternalPtrAddr(e); + wickra_gap_side_by_side_white_reset(h); + return R_NilValue; +} + +static void garch11_fin(SEXP e) { + struct Garch11 *h = (struct Garch11 *)R_ExternalPtrAddr(e); + if (h) wickra_garch11_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_garch11_new(SEXP a0, SEXP a1, SEXP a2) { + struct Garch11 *h = wickra_garch11_new(Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid Garch11 parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, garch11_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_garch11_update(SEXP e, SEXP a0) { + struct Garch11 *h = (struct Garch11 *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_garch11_update(h, Rf_asReal(a0))); +} +SEXP wk_garch11_batch(SEXP e, SEXP a0) { + struct Garch11 *h = (struct Garch11 *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_garch11_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_garch11_reset(SEXP e) { + struct Garch11 *h = (struct Garch11 *)R_ExternalPtrAddr(e); + wickra_garch11_reset(h); + return R_NilValue; +} + +static void garman_klass_volatility_fin(SEXP e) { + struct GarmanKlassVolatility *h = (struct GarmanKlassVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_garman_klass_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_garman_klass_volatility_new(SEXP a0, SEXP a1) { + struct GarmanKlassVolatility *h = wickra_garman_klass_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid GarmanKlassVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, garman_klass_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_garman_klass_volatility_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GarmanKlassVolatility *h = (struct GarmanKlassVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_garman_klass_volatility_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_garman_klass_volatility_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GarmanKlassVolatility *h = (struct GarmanKlassVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_garman_klass_volatility_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_garman_klass_volatility_reset(SEXP e) { + struct GarmanKlassVolatility *h = (struct GarmanKlassVolatility *)R_ExternalPtrAddr(e); + wickra_garman_klass_volatility_reset(h); + return R_NilValue; +} + +static void gartley_fin(SEXP e) { + struct Gartley *h = (struct Gartley *)R_ExternalPtrAddr(e); + if (h) wickra_gartley_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gartley_new(void) { + struct Gartley *h = wickra_gartley_new(); + if (!h) Rf_error("invalid Gartley parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gartley_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gartley_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Gartley *h = (struct Gartley *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_gartley_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_gartley_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Gartley *h = (struct Gartley *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_gartley_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_gartley_reset(SEXP e) { + struct Gartley *h = (struct Gartley *)R_ExternalPtrAddr(e); + wickra_gartley_reset(h); + return R_NilValue; +} + +static void gator_oscillator_fin(SEXP e) { + struct GatorOscillator *h = (struct GatorOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_gator_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gator_oscillator_new(SEXP a0, SEXP a1, SEXP a2) { + struct GatorOscillator *h = wickra_gator_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid GatorOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gator_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gator_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GatorOscillator *h = (struct GatorOscillator *)R_ExternalPtrAddr(e); + struct WickraGatorOscillatorOutput out; + int ok = wickra_gator_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_gator_oscillator_reset(SEXP e) { + struct GatorOscillator *h = (struct GatorOscillator *)R_ExternalPtrAddr(e); + wickra_gator_oscillator_reset(h); + return R_NilValue; +} + +static void generalized_dema_fin(SEXP e) { + struct GeneralizedDema *h = (struct GeneralizedDema *)R_ExternalPtrAddr(e); + if (h) wickra_generalized_dema_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_generalized_dema_new(SEXP a0, SEXP a1) { + struct GeneralizedDema *h = wickra_generalized_dema_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid GeneralizedDema parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, generalized_dema_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_generalized_dema_update(SEXP e, SEXP a0) { + struct GeneralizedDema *h = (struct GeneralizedDema *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_generalized_dema_update(h, Rf_asReal(a0))); +} +SEXP wk_generalized_dema_batch(SEXP e, SEXP a0) { + struct GeneralizedDema *h = (struct GeneralizedDema *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_generalized_dema_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_generalized_dema_reset(SEXP e) { + struct GeneralizedDema *h = (struct GeneralizedDema *)R_ExternalPtrAddr(e); + wickra_generalized_dema_reset(h); + return R_NilValue; +} + +static void geometric_ma_fin(SEXP e) { + struct GeometricMa *h = (struct GeometricMa *)R_ExternalPtrAddr(e); + if (h) wickra_geometric_ma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_geometric_ma_new(SEXP a0) { + struct GeometricMa *h = wickra_geometric_ma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid GeometricMa parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, geometric_ma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_geometric_ma_update(SEXP e, SEXP a0) { + struct GeometricMa *h = (struct GeometricMa *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_geometric_ma_update(h, Rf_asReal(a0))); +} +SEXP wk_geometric_ma_batch(SEXP e, SEXP a0) { + struct GeometricMa *h = (struct GeometricMa *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_geometric_ma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_geometric_ma_reset(SEXP e) { + struct GeometricMa *h = (struct GeometricMa *)R_ExternalPtrAddr(e); + wickra_geometric_ma_reset(h); + return R_NilValue; +} + +static void golden_pocket_fin(SEXP e) { + struct GoldenPocket *h = (struct GoldenPocket *)R_ExternalPtrAddr(e); + if (h) wickra_golden_pocket_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_golden_pocket_new(void) { + struct GoldenPocket *h = wickra_golden_pocket_new(); + if (!h) Rf_error("invalid GoldenPocket parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, golden_pocket_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_golden_pocket_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GoldenPocket *h = (struct GoldenPocket *)R_ExternalPtrAddr(e); + struct WickraGoldenPocketOutput out; + int ok = wickra_golden_pocket_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.low : NA_REAL; + REAL(r)[1] = ok ? (double)out.mid : NA_REAL; + REAL(r)[2] = ok ? (double)out.high : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("low")); + SET_STRING_ELT(nm, 1, Rf_mkChar("mid")); + SET_STRING_ELT(nm, 2, Rf_mkChar("high")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_golden_pocket_reset(SEXP e) { + struct GoldenPocket *h = (struct GoldenPocket *)R_ExternalPtrAddr(e); + wickra_golden_pocket_reset(h); + return R_NilValue; +} + +static void granger_causality_fin(SEXP e) { + struct GrangerCausality *h = (struct GrangerCausality *)R_ExternalPtrAddr(e); + if (h) wickra_granger_causality_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_granger_causality_new(SEXP a0, SEXP a1) { + struct GrangerCausality *h = wickra_granger_causality_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid GrangerCausality parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, granger_causality_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_granger_causality_update(SEXP e, SEXP a0, SEXP a1) { + struct GrangerCausality *h = (struct GrangerCausality *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_granger_causality_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_granger_causality_batch(SEXP e, SEXP a0, SEXP a1) { + struct GrangerCausality *h = (struct GrangerCausality *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_granger_causality_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_granger_causality_reset(SEXP e) { + struct GrangerCausality *h = (struct GrangerCausality *)R_ExternalPtrAddr(e); + wickra_granger_causality_reset(h); + return R_NilValue; +} + +static void gravestone_doji_fin(SEXP e) { + struct GravestoneDoji *h = (struct GravestoneDoji *)R_ExternalPtrAddr(e); + if (h) wickra_gravestone_doji_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_gravestone_doji_new(void) { + struct GravestoneDoji *h = wickra_gravestone_doji_new(); + if (!h) Rf_error("invalid GravestoneDoji parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, gravestone_doji_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_gravestone_doji_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GravestoneDoji *h = (struct GravestoneDoji *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_gravestone_doji_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_gravestone_doji_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct GravestoneDoji *h = (struct GravestoneDoji *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_gravestone_doji_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_gravestone_doji_reset(SEXP e) { + struct GravestoneDoji *h = (struct GravestoneDoji *)R_ExternalPtrAddr(e); + wickra_gravestone_doji_reset(h); + return R_NilValue; +} + +static void hammer_fin(SEXP e) { + struct Hammer *h = (struct Hammer *)R_ExternalPtrAddr(e); + if (h) wickra_hammer_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hammer_new(void) { + struct Hammer *h = wickra_hammer_new(); + if (!h) Rf_error("invalid Hammer parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hammer_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hammer_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Hammer *h = (struct Hammer *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hammer_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_hammer_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Hammer *h = (struct Hammer *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_hammer_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hammer_reset(SEXP e) { + struct Hammer *h = (struct Hammer *)R_ExternalPtrAddr(e); + wickra_hammer_reset(h); + return R_NilValue; +} + +static void hanging_man_fin(SEXP e) { + struct HangingMan *h = (struct HangingMan *)R_ExternalPtrAddr(e); + if (h) wickra_hanging_man_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hanging_man_new(void) { + struct HangingMan *h = wickra_hanging_man_new(); + if (!h) Rf_error("invalid HangingMan parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hanging_man_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hanging_man_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HangingMan *h = (struct HangingMan *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hanging_man_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_hanging_man_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HangingMan *h = (struct HangingMan *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_hanging_man_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hanging_man_reset(SEXP e) { + struct HangingMan *h = (struct HangingMan *)R_ExternalPtrAddr(e); + wickra_hanging_man_reset(h); + return R_NilValue; +} + +static void harami_fin(SEXP e) { + struct Harami *h = (struct Harami *)R_ExternalPtrAddr(e); + if (h) wickra_harami_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_harami_new(void) { + struct Harami *h = wickra_harami_new(); + if (!h) Rf_error("invalid Harami parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, harami_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_harami_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Harami *h = (struct Harami *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_harami_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_harami_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Harami *h = (struct Harami *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_harami_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_harami_reset(SEXP e) { + struct Harami *h = (struct Harami *)R_ExternalPtrAddr(e); + wickra_harami_reset(h); + return R_NilValue; +} + +static void harami_cross_fin(SEXP e) { + struct HaramiCross *h = (struct HaramiCross *)R_ExternalPtrAddr(e); + if (h) wickra_harami_cross_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_harami_cross_new(void) { + struct HaramiCross *h = wickra_harami_cross_new(); + if (!h) Rf_error("invalid HaramiCross parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, harami_cross_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_harami_cross_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HaramiCross *h = (struct HaramiCross *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_harami_cross_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_harami_cross_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HaramiCross *h = (struct HaramiCross *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_harami_cross_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_harami_cross_reset(SEXP e) { + struct HaramiCross *h = (struct HaramiCross *)R_ExternalPtrAddr(e); + wickra_harami_cross_reset(h); + return R_NilValue; +} + +static void hasbrouck_information_share_fin(SEXP e) { + struct HasbrouckInformationShare *h = (struct HasbrouckInformationShare *)R_ExternalPtrAddr(e); + if (h) wickra_hasbrouck_information_share_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hasbrouck_information_share_new(SEXP a0) { + struct HasbrouckInformationShare *h = wickra_hasbrouck_information_share_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid HasbrouckInformationShare parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hasbrouck_information_share_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hasbrouck_information_share_update(SEXP e, SEXP a0, SEXP a1) { + struct HasbrouckInformationShare *h = (struct HasbrouckInformationShare *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hasbrouck_information_share_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_hasbrouck_information_share_batch(SEXP e, SEXP a0, SEXP a1) { + struct HasbrouckInformationShare *h = (struct HasbrouckInformationShare *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_hasbrouck_information_share_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hasbrouck_information_share_reset(SEXP e) { + struct HasbrouckInformationShare *h = (struct HasbrouckInformationShare *)R_ExternalPtrAddr(e); + wickra_hasbrouck_information_share_reset(h); + return R_NilValue; +} + +static void head_and_shoulders_fin(SEXP e) { + struct HeadAndShoulders *h = (struct HeadAndShoulders *)R_ExternalPtrAddr(e); + if (h) wickra_head_and_shoulders_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_head_and_shoulders_new(void) { + struct HeadAndShoulders *h = wickra_head_and_shoulders_new(); + if (!h) Rf_error("invalid HeadAndShoulders parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, head_and_shoulders_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_head_and_shoulders_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HeadAndShoulders *h = (struct HeadAndShoulders *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_head_and_shoulders_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_head_and_shoulders_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HeadAndShoulders *h = (struct HeadAndShoulders *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_head_and_shoulders_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_head_and_shoulders_reset(SEXP e) { + struct HeadAndShoulders *h = (struct HeadAndShoulders *)R_ExternalPtrAddr(e); + wickra_head_and_shoulders_reset(h); + return R_NilValue; +} + +static void heikin_ashi_fin(SEXP e) { + struct HeikinAshi *h = (struct HeikinAshi *)R_ExternalPtrAddr(e); + if (h) wickra_heikin_ashi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_heikin_ashi_new(void) { + struct HeikinAshi *h = wickra_heikin_ashi_new(); + if (!h) Rf_error("invalid HeikinAshi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, heikin_ashi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_heikin_ashi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HeikinAshi *h = (struct HeikinAshi *)R_ExternalPtrAddr(e); + struct WickraHeikinAshiOutput out; + int ok = wickra_heikin_ashi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.open : NA_REAL; + REAL(r)[1] = ok ? (double)out.high : NA_REAL; + REAL(r)[2] = ok ? (double)out.low : NA_REAL; + REAL(r)[3] = ok ? (double)out.close : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("open")); + SET_STRING_ELT(nm, 1, Rf_mkChar("high")); + SET_STRING_ELT(nm, 2, Rf_mkChar("low")); + SET_STRING_ELT(nm, 3, Rf_mkChar("close")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_heikin_ashi_reset(SEXP e) { + struct HeikinAshi *h = (struct HeikinAshi *)R_ExternalPtrAddr(e); + wickra_heikin_ashi_reset(h); + return R_NilValue; +} + +static void heikin_ashi_oscillator_fin(SEXP e) { + struct HeikinAshiOscillator *h = (struct HeikinAshiOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_heikin_ashi_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_heikin_ashi_oscillator_new(SEXP a0) { + struct HeikinAshiOscillator *h = wickra_heikin_ashi_oscillator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid HeikinAshiOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, heikin_ashi_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_heikin_ashi_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HeikinAshiOscillator *h = (struct HeikinAshiOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_heikin_ashi_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_heikin_ashi_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HeikinAshiOscillator *h = (struct HeikinAshiOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_heikin_ashi_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_heikin_ashi_oscillator_reset(SEXP e) { + struct HeikinAshiOscillator *h = (struct HeikinAshiOscillator *)R_ExternalPtrAddr(e); + wickra_heikin_ashi_oscillator_reset(h); + return R_NilValue; +} + +static void hi_lo_activator_fin(SEXP e) { + struct HiLoActivator *h = (struct HiLoActivator *)R_ExternalPtrAddr(e); + if (h) wickra_hi_lo_activator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hi_lo_activator_new(SEXP a0) { + struct HiLoActivator *h = wickra_hi_lo_activator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid HiLoActivator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hi_lo_activator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hi_lo_activator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HiLoActivator *h = (struct HiLoActivator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hi_lo_activator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_hi_lo_activator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HiLoActivator *h = (struct HiLoActivator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_hi_lo_activator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hi_lo_activator_reset(SEXP e) { + struct HiLoActivator *h = (struct HiLoActivator *)R_ExternalPtrAddr(e); + wickra_hi_lo_activator_reset(h); + return R_NilValue; +} + +static void high_low_index_fin(SEXP e) { + struct HighLowIndex *h = (struct HighLowIndex *)R_ExternalPtrAddr(e); + if (h) wickra_high_low_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_high_low_index_new(SEXP a0) { + struct HighLowIndex *h = wickra_high_low_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid HighLowIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, high_low_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_high_low_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct HighLowIndex *h = (struct HighLowIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_high_low_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_high_low_index_reset(SEXP e) { + struct HighLowIndex *h = (struct HighLowIndex *)R_ExternalPtrAddr(e); + wickra_high_low_index_reset(h); + return R_NilValue; +} + +static void high_low_range_fin(SEXP e) { + struct HighLowRange *h = (struct HighLowRange *)R_ExternalPtrAddr(e); + if (h) wickra_high_low_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_high_low_range_new(void) { + struct HighLowRange *h = wickra_high_low_range_new(); + if (!h) Rf_error("invalid HighLowRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, high_low_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_high_low_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HighLowRange *h = (struct HighLowRange *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_high_low_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_high_low_range_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HighLowRange *h = (struct HighLowRange *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_high_low_range_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_high_low_range_reset(SEXP e) { + struct HighLowRange *h = (struct HighLowRange *)R_ExternalPtrAddr(e); + wickra_high_low_range_reset(h); + return R_NilValue; +} + +static void high_low_volume_nodes_fin(SEXP e) { + struct HighLowVolumeNodes *h = (struct HighLowVolumeNodes *)R_ExternalPtrAddr(e); + if (h) wickra_high_low_volume_nodes_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_high_low_volume_nodes_new(SEXP a0, SEXP a1) { + struct HighLowVolumeNodes *h = wickra_high_low_volume_nodes_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid HighLowVolumeNodes parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, high_low_volume_nodes_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_high_low_volume_nodes_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HighLowVolumeNodes *h = (struct HighLowVolumeNodes *)R_ExternalPtrAddr(e); + struct WickraHighLowVolumeNodesOutput out; + int ok = wickra_high_low_volume_nodes_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.hvn : NA_REAL; + REAL(r)[1] = ok ? (double)out.lvn : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("hvn")); + SET_STRING_ELT(nm, 1, Rf_mkChar("lvn")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_high_low_volume_nodes_reset(SEXP e) { + struct HighLowVolumeNodes *h = (struct HighLowVolumeNodes *)R_ExternalPtrAddr(e); + wickra_high_low_volume_nodes_reset(h); + return R_NilValue; +} + +static void high_wave_fin(SEXP e) { + struct HighWave *h = (struct HighWave *)R_ExternalPtrAddr(e); + if (h) wickra_high_wave_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_high_wave_new(void) { + struct HighWave *h = wickra_high_wave_new(); + if (!h) Rf_error("invalid HighWave parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, high_wave_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_high_wave_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HighWave *h = (struct HighWave *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_high_wave_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_high_wave_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HighWave *h = (struct HighWave *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_high_wave_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_high_wave_reset(SEXP e) { + struct HighWave *h = (struct HighWave *)R_ExternalPtrAddr(e); + wickra_high_wave_reset(h); + return R_NilValue; +} + +static void highpass_filter_fin(SEXP e) { + struct HighpassFilter *h = (struct HighpassFilter *)R_ExternalPtrAddr(e); + if (h) wickra_highpass_filter_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_highpass_filter_new(SEXP a0) { + struct HighpassFilter *h = wickra_highpass_filter_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid HighpassFilter parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, highpass_filter_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_highpass_filter_update(SEXP e, SEXP a0) { + struct HighpassFilter *h = (struct HighpassFilter *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_highpass_filter_update(h, Rf_asReal(a0))); +} +SEXP wk_highpass_filter_batch(SEXP e, SEXP a0) { + struct HighpassFilter *h = (struct HighpassFilter *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_highpass_filter_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_highpass_filter_reset(SEXP e) { + struct HighpassFilter *h = (struct HighpassFilter *)R_ExternalPtrAddr(e); + wickra_highpass_filter_reset(h); + return R_NilValue; +} + +static void hikkake_fin(SEXP e) { + struct Hikkake *h = (struct Hikkake *)R_ExternalPtrAddr(e); + if (h) wickra_hikkake_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hikkake_new(void) { + struct Hikkake *h = wickra_hikkake_new(); + if (!h) Rf_error("invalid Hikkake parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hikkake_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hikkake_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Hikkake *h = (struct Hikkake *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hikkake_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_hikkake_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Hikkake *h = (struct Hikkake *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_hikkake_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hikkake_reset(SEXP e) { + struct Hikkake *h = (struct Hikkake *)R_ExternalPtrAddr(e); + wickra_hikkake_reset(h); + return R_NilValue; +} + +static void hikkake_modified_fin(SEXP e) { + struct HikkakeModified *h = (struct HikkakeModified *)R_ExternalPtrAddr(e); + if (h) wickra_hikkake_modified_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hikkake_modified_new(void) { + struct HikkakeModified *h = wickra_hikkake_modified_new(); + if (!h) Rf_error("invalid HikkakeModified parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hikkake_modified_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hikkake_modified_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HikkakeModified *h = (struct HikkakeModified *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hikkake_modified_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_hikkake_modified_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HikkakeModified *h = (struct HikkakeModified *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_hikkake_modified_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hikkake_modified_reset(SEXP e) { + struct HikkakeModified *h = (struct HikkakeModified *)R_ExternalPtrAddr(e); + wickra_hikkake_modified_reset(h); + return R_NilValue; +} + +static void hilbert_dominant_cycle_fin(SEXP e) { + struct HilbertDominantCycle *h = (struct HilbertDominantCycle *)R_ExternalPtrAddr(e); + if (h) wickra_hilbert_dominant_cycle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hilbert_dominant_cycle_new(void) { + struct HilbertDominantCycle *h = wickra_hilbert_dominant_cycle_new(); + if (!h) Rf_error("invalid HilbertDominantCycle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hilbert_dominant_cycle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hilbert_dominant_cycle_update(SEXP e, SEXP a0) { + struct HilbertDominantCycle *h = (struct HilbertDominantCycle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hilbert_dominant_cycle_update(h, Rf_asReal(a0))); +} +SEXP wk_hilbert_dominant_cycle_batch(SEXP e, SEXP a0) { + struct HilbertDominantCycle *h = (struct HilbertDominantCycle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_hilbert_dominant_cycle_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hilbert_dominant_cycle_reset(SEXP e) { + struct HilbertDominantCycle *h = (struct HilbertDominantCycle *)R_ExternalPtrAddr(e); + wickra_hilbert_dominant_cycle_reset(h); + return R_NilValue; +} + +static void historical_volatility_fin(SEXP e) { + struct HistoricalVolatility *h = (struct HistoricalVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_historical_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_historical_volatility_new(SEXP a0, SEXP a1) { + struct HistoricalVolatility *h = wickra_historical_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid HistoricalVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, historical_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_historical_volatility_update(SEXP e, SEXP a0) { + struct HistoricalVolatility *h = (struct HistoricalVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_historical_volatility_update(h, Rf_asReal(a0))); +} +SEXP wk_historical_volatility_batch(SEXP e, SEXP a0) { + struct HistoricalVolatility *h = (struct HistoricalVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_historical_volatility_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_historical_volatility_reset(SEXP e) { + struct HistoricalVolatility *h = (struct HistoricalVolatility *)R_ExternalPtrAddr(e); + wickra_historical_volatility_reset(h); + return R_NilValue; +} + +static void hma_fin(SEXP e) { + struct Hma *h = (struct Hma *)R_ExternalPtrAddr(e); + if (h) wickra_hma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hma_new(SEXP a0) { + struct Hma *h = wickra_hma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Hma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hma_update(SEXP e, SEXP a0) { + struct Hma *h = (struct Hma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hma_update(h, Rf_asReal(a0))); +} +SEXP wk_hma_batch(SEXP e, SEXP a0) { + struct Hma *h = (struct Hma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_hma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hma_reset(SEXP e) { + struct Hma *h = (struct Hma *)R_ExternalPtrAddr(e); + wickra_hma_reset(h); + return R_NilValue; +} + +static void holt_winters_fin(SEXP e) { + struct HoltWinters *h = (struct HoltWinters *)R_ExternalPtrAddr(e); + if (h) wickra_holt_winters_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_holt_winters_new(SEXP a0, SEXP a1) { + struct HoltWinters *h = wickra_holt_winters_new(Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid HoltWinters parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, holt_winters_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_holt_winters_update(SEXP e, SEXP a0) { + struct HoltWinters *h = (struct HoltWinters *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_holt_winters_update(h, Rf_asReal(a0))); +} +SEXP wk_holt_winters_batch(SEXP e, SEXP a0) { + struct HoltWinters *h = (struct HoltWinters *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_holt_winters_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_holt_winters_reset(SEXP e) { + struct HoltWinters *h = (struct HoltWinters *)R_ExternalPtrAddr(e); + wickra_holt_winters_reset(h); + return R_NilValue; +} + +static void homing_pigeon_fin(SEXP e) { + struct HomingPigeon *h = (struct HomingPigeon *)R_ExternalPtrAddr(e); + if (h) wickra_homing_pigeon_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_homing_pigeon_new(void) { + struct HomingPigeon *h = wickra_homing_pigeon_new(); + if (!h) Rf_error("invalid HomingPigeon parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, homing_pigeon_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_homing_pigeon_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HomingPigeon *h = (struct HomingPigeon *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_homing_pigeon_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_homing_pigeon_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HomingPigeon *h = (struct HomingPigeon *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_homing_pigeon_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_homing_pigeon_reset(SEXP e) { + struct HomingPigeon *h = (struct HomingPigeon *)R_ExternalPtrAddr(e); + wickra_homing_pigeon_reset(h); + return R_NilValue; +} + +static void ht_dc_phase_fin(SEXP e) { + struct HtDcPhase *h = (struct HtDcPhase *)R_ExternalPtrAddr(e); + if (h) wickra_ht_dc_phase_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ht_dc_phase_new(void) { + struct HtDcPhase *h = wickra_ht_dc_phase_new(); + if (!h) Rf_error("invalid HtDcPhase parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ht_dc_phase_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ht_dc_phase_update(SEXP e, SEXP a0) { + struct HtDcPhase *h = (struct HtDcPhase *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ht_dc_phase_update(h, Rf_asReal(a0))); +} +SEXP wk_ht_dc_phase_batch(SEXP e, SEXP a0) { + struct HtDcPhase *h = (struct HtDcPhase *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ht_dc_phase_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ht_dc_phase_reset(SEXP e) { + struct HtDcPhase *h = (struct HtDcPhase *)R_ExternalPtrAddr(e); + wickra_ht_dc_phase_reset(h); + return R_NilValue; +} + +static void ht_phasor_fin(SEXP e) { + struct HtPhasor *h = (struct HtPhasor *)R_ExternalPtrAddr(e); + if (h) wickra_ht_phasor_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ht_phasor_new(void) { + struct HtPhasor *h = wickra_ht_phasor_new(); + if (!h) Rf_error("invalid HtPhasor parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ht_phasor_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ht_phasor_update(SEXP e, SEXP a0) { + struct HtPhasor *h = (struct HtPhasor *)R_ExternalPtrAddr(e); + struct WickraHtPhasorOutput out; + int ok = wickra_ht_phasor_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.inphase : NA_REAL; + REAL(r)[1] = ok ? (double)out.quadrature : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("inphase")); + SET_STRING_ELT(nm, 1, Rf_mkChar("quadrature")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_ht_phasor_reset(SEXP e) { + struct HtPhasor *h = (struct HtPhasor *)R_ExternalPtrAddr(e); + wickra_ht_phasor_reset(h); + return R_NilValue; +} + +static void ht_trend_mode_fin(SEXP e) { + struct HtTrendMode *h = (struct HtTrendMode *)R_ExternalPtrAddr(e); + if (h) wickra_ht_trend_mode_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ht_trend_mode_new(void) { + struct HtTrendMode *h = wickra_ht_trend_mode_new(); + if (!h) Rf_error("invalid HtTrendMode parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ht_trend_mode_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ht_trend_mode_update(SEXP e, SEXP a0) { + struct HtTrendMode *h = (struct HtTrendMode *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ht_trend_mode_update(h, Rf_asReal(a0))); +} +SEXP wk_ht_trend_mode_batch(SEXP e, SEXP a0) { + struct HtTrendMode *h = (struct HtTrendMode *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ht_trend_mode_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ht_trend_mode_reset(SEXP e) { + struct HtTrendMode *h = (struct HtTrendMode *)R_ExternalPtrAddr(e); + wickra_ht_trend_mode_reset(h); + return R_NilValue; +} + +static void hurst_channel_fin(SEXP e) { + struct HurstChannel *h = (struct HurstChannel *)R_ExternalPtrAddr(e); + if (h) wickra_hurst_channel_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hurst_channel_new(SEXP a0, SEXP a1) { + struct HurstChannel *h = wickra_hurst_channel_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid HurstChannel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hurst_channel_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hurst_channel_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct HurstChannel *h = (struct HurstChannel *)R_ExternalPtrAddr(e); + struct WickraHurstChannelOutput out; + int ok = wickra_hurst_channel_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_hurst_channel_reset(SEXP e) { + struct HurstChannel *h = (struct HurstChannel *)R_ExternalPtrAddr(e); + wickra_hurst_channel_reset(h); + return R_NilValue; +} + +static void hurst_exponent_fin(SEXP e) { + struct HurstExponent *h = (struct HurstExponent *)R_ExternalPtrAddr(e); + if (h) wickra_hurst_exponent_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_hurst_exponent_new(SEXP a0, SEXP a1) { + struct HurstExponent *h = wickra_hurst_exponent_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid HurstExponent parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, hurst_exponent_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_hurst_exponent_update(SEXP e, SEXP a0) { + struct HurstExponent *h = (struct HurstExponent *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_hurst_exponent_update(h, Rf_asReal(a0))); +} +SEXP wk_hurst_exponent_batch(SEXP e, SEXP a0) { + struct HurstExponent *h = (struct HurstExponent *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_hurst_exponent_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_hurst_exponent_reset(SEXP e) { + struct HurstExponent *h = (struct HurstExponent *)R_ExternalPtrAddr(e); + wickra_hurst_exponent_reset(h); + return R_NilValue; +} + +static void ichimoku_fin(SEXP e) { + struct Ichimoku *h = (struct Ichimoku *)R_ExternalPtrAddr(e); + if (h) wickra_ichimoku_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ichimoku_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Ichimoku *h = wickra_ichimoku_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid Ichimoku parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ichimoku_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ichimoku_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Ichimoku *h = (struct Ichimoku *)R_ExternalPtrAddr(e); + struct WickraIchimokuOutput out; + int ok = wickra_ichimoku_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.tenkan : NA_REAL; + REAL(r)[1] = ok ? (double)out.kijun : NA_REAL; + REAL(r)[2] = ok ? (double)out.senkou_a : NA_REAL; + REAL(r)[3] = ok ? (double)out.senkou_b : NA_REAL; + REAL(r)[4] = ok ? (double)out.chikou : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("tenkan")); + SET_STRING_ELT(nm, 1, Rf_mkChar("kijun")); + SET_STRING_ELT(nm, 2, Rf_mkChar("senkou_a")); + SET_STRING_ELT(nm, 3, Rf_mkChar("senkou_b")); + SET_STRING_ELT(nm, 4, Rf_mkChar("chikou")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_ichimoku_reset(SEXP e) { + struct Ichimoku *h = (struct Ichimoku *)R_ExternalPtrAddr(e); + wickra_ichimoku_reset(h); + return R_NilValue; +} + +static void identical_three_crows_fin(SEXP e) { + struct IdenticalThreeCrows *h = (struct IdenticalThreeCrows *)R_ExternalPtrAddr(e); + if (h) wickra_identical_three_crows_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_identical_three_crows_new(void) { + struct IdenticalThreeCrows *h = wickra_identical_three_crows_new(); + if (!h) Rf_error("invalid IdenticalThreeCrows parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, identical_three_crows_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_identical_three_crows_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IdenticalThreeCrows *h = (struct IdenticalThreeCrows *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_identical_three_crows_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_identical_three_crows_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IdenticalThreeCrows *h = (struct IdenticalThreeCrows *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_identical_three_crows_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_identical_three_crows_reset(SEXP e) { + struct IdenticalThreeCrows *h = (struct IdenticalThreeCrows *)R_ExternalPtrAddr(e); + wickra_identical_three_crows_reset(h); + return R_NilValue; +} + +static void imbalance_bars_fin(SEXP e) { + struct ImbalanceBars *h = (struct ImbalanceBars *)R_ExternalPtrAddr(e); + if (h) wickra_imbalance_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_imbalance_bars_new(SEXP a0) { + struct ImbalanceBars *h = wickra_imbalance_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid ImbalanceBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, imbalance_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_imbalance_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ImbalanceBars *h = (struct ImbalanceBars *)R_ExternalPtrAddr(e); + struct WickraImbalanceBar buf[64]; + size_t n = wickra_imbalance_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 6)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + REAL(r)[i + n * 3] = (double)buf[i].close; + REAL(r)[i + n * 4] = (double)buf[i].imbalance; + REAL(r)[i + n * 5] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 6)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SET_STRING_ELT(cn, 3, Rf_mkChar("close")); + SET_STRING_ELT(cn, 4, Rf_mkChar("imbalance")); + SET_STRING_ELT(cn, 5, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_imbalance_bars_reset(SEXP e) { + struct ImbalanceBars *h = (struct ImbalanceBars *)R_ExternalPtrAddr(e); + wickra_imbalance_bars_reset(h); + return R_NilValue; +} + +static void in_neck_fin(SEXP e) { + struct InNeck *h = (struct InNeck *)R_ExternalPtrAddr(e); + if (h) wickra_in_neck_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_in_neck_new(void) { + struct InNeck *h = wickra_in_neck_new(); + if (!h) Rf_error("invalid InNeck parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, in_neck_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_in_neck_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct InNeck *h = (struct InNeck *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_in_neck_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_in_neck_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct InNeck *h = (struct InNeck *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_in_neck_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_in_neck_reset(SEXP e) { + struct InNeck *h = (struct InNeck *)R_ExternalPtrAddr(e); + wickra_in_neck_reset(h); + return R_NilValue; +} + +static void inertia_fin(SEXP e) { + struct Inertia *h = (struct Inertia *)R_ExternalPtrAddr(e); + if (h) wickra_inertia_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_inertia_new(SEXP a0, SEXP a1) { + struct Inertia *h = wickra_inertia_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Inertia parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, inertia_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_inertia_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Inertia *h = (struct Inertia *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_inertia_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_inertia_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Inertia *h = (struct Inertia *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_inertia_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_inertia_reset(SEXP e) { + struct Inertia *h = (struct Inertia *)R_ExternalPtrAddr(e); + wickra_inertia_reset(h); + return R_NilValue; +} + +static void information_ratio_fin(SEXP e) { + struct InformationRatio *h = (struct InformationRatio *)R_ExternalPtrAddr(e); + if (h) wickra_information_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_information_ratio_new(SEXP a0) { + struct InformationRatio *h = wickra_information_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid InformationRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, information_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_information_ratio_update(SEXP e, SEXP a0, SEXP a1) { + struct InformationRatio *h = (struct InformationRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_information_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_information_ratio_batch(SEXP e, SEXP a0, SEXP a1) { + struct InformationRatio *h = (struct InformationRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_information_ratio_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_information_ratio_reset(SEXP e) { + struct InformationRatio *h = (struct InformationRatio *)R_ExternalPtrAddr(e); + wickra_information_ratio_reset(h); + return R_NilValue; +} + +static void initial_balance_fin(SEXP e) { + struct InitialBalance *h = (struct InitialBalance *)R_ExternalPtrAddr(e); + if (h) wickra_initial_balance_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_initial_balance_new(SEXP a0) { + struct InitialBalance *h = wickra_initial_balance_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid InitialBalance parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, initial_balance_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_initial_balance_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct InitialBalance *h = (struct InitialBalance *)R_ExternalPtrAddr(e); + struct WickraInitialBalanceOutput out; + int ok = wickra_initial_balance_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.high : NA_REAL; + REAL(r)[1] = ok ? (double)out.low : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("high")); + SET_STRING_ELT(nm, 1, Rf_mkChar("low")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_initial_balance_reset(SEXP e) { + struct InitialBalance *h = (struct InitialBalance *)R_ExternalPtrAddr(e); + wickra_initial_balance_reset(h); + return R_NilValue; +} + +static void instantaneous_trendline_fin(SEXP e) { + struct InstantaneousTrendline *h = (struct InstantaneousTrendline *)R_ExternalPtrAddr(e); + if (h) wickra_instantaneous_trendline_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_instantaneous_trendline_new(SEXP a0) { + struct InstantaneousTrendline *h = wickra_instantaneous_trendline_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid InstantaneousTrendline parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, instantaneous_trendline_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_instantaneous_trendline_update(SEXP e, SEXP a0) { + struct InstantaneousTrendline *h = (struct InstantaneousTrendline *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_instantaneous_trendline_update(h, Rf_asReal(a0))); +} +SEXP wk_instantaneous_trendline_batch(SEXP e, SEXP a0) { + struct InstantaneousTrendline *h = (struct InstantaneousTrendline *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_instantaneous_trendline_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_instantaneous_trendline_reset(SEXP e) { + struct InstantaneousTrendline *h = (struct InstantaneousTrendline *)R_ExternalPtrAddr(e); + wickra_instantaneous_trendline_reset(h); + return R_NilValue; +} + +static void intraday_intensity_fin(SEXP e) { + struct IntradayIntensity *h = (struct IntradayIntensity *)R_ExternalPtrAddr(e); + if (h) wickra_intraday_intensity_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_intraday_intensity_new(void) { + struct IntradayIntensity *h = wickra_intraday_intensity_new(); + if (!h) Rf_error("invalid IntradayIntensity parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, intraday_intensity_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_intraday_intensity_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IntradayIntensity *h = (struct IntradayIntensity *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_intraday_intensity_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_intraday_intensity_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IntradayIntensity *h = (struct IntradayIntensity *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_intraday_intensity_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_intraday_intensity_reset(SEXP e) { + struct IntradayIntensity *h = (struct IntradayIntensity *)R_ExternalPtrAddr(e); + wickra_intraday_intensity_reset(h); + return R_NilValue; +} + +static void intraday_momentum_index_fin(SEXP e) { + struct IntradayMomentumIndex *h = (struct IntradayMomentumIndex *)R_ExternalPtrAddr(e); + if (h) wickra_intraday_momentum_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_intraday_momentum_index_new(SEXP a0) { + struct IntradayMomentumIndex *h = wickra_intraday_momentum_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid IntradayMomentumIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, intraday_momentum_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_intraday_momentum_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IntradayMomentumIndex *h = (struct IntradayMomentumIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_intraday_momentum_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_intraday_momentum_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct IntradayMomentumIndex *h = (struct IntradayMomentumIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_intraday_momentum_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_intraday_momentum_index_reset(SEXP e) { + struct IntradayMomentumIndex *h = (struct IntradayMomentumIndex *)R_ExternalPtrAddr(e); + wickra_intraday_momentum_index_reset(h); + return R_NilValue; +} + +static void intraday_volatility_profile_fin(SEXP e) { + struct IntradayVolatilityProfile *h = (struct IntradayVolatilityProfile *)R_ExternalPtrAddr(e); + if (h) wickra_intraday_volatility_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_intraday_volatility_profile_new(SEXP a0, SEXP a1) { + struct IntradayVolatilityProfile *h = wickra_intraday_volatility_profile_new((uintptr_t)Rf_asReal(a0), (int32_t)Rf_asInteger(a1)); + if (!h) Rf_error("invalid IntradayVolatilityProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, intraday_volatility_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_intraday_volatility_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct IntradayVolatilityProfile *h = (struct IntradayVolatilityProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + R_xlen_t n = wickra_intraday_volatility_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + UNPROTECT(2); + return vv; +} +SEXP wk_intraday_volatility_profile_reset(SEXP e) { + struct IntradayVolatilityProfile *h = (struct IntradayVolatilityProfile *)R_ExternalPtrAddr(e); + wickra_intraday_volatility_profile_reset(h); + return R_NilValue; +} + +static void inverse_fisher_transform_fin(SEXP e) { + struct InverseFisherTransform *h = (struct InverseFisherTransform *)R_ExternalPtrAddr(e); + if (h) wickra_inverse_fisher_transform_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_inverse_fisher_transform_new(SEXP a0) { + struct InverseFisherTransform *h = wickra_inverse_fisher_transform_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid InverseFisherTransform parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, inverse_fisher_transform_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_inverse_fisher_transform_update(SEXP e, SEXP a0) { + struct InverseFisherTransform *h = (struct InverseFisherTransform *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_inverse_fisher_transform_update(h, Rf_asReal(a0))); +} +SEXP wk_inverse_fisher_transform_batch(SEXP e, SEXP a0) { + struct InverseFisherTransform *h = (struct InverseFisherTransform *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_inverse_fisher_transform_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_inverse_fisher_transform_reset(SEXP e) { + struct InverseFisherTransform *h = (struct InverseFisherTransform *)R_ExternalPtrAddr(e); + wickra_inverse_fisher_transform_reset(h); + return R_NilValue; +} + +static void inverted_hammer_fin(SEXP e) { + struct InvertedHammer *h = (struct InvertedHammer *)R_ExternalPtrAddr(e); + if (h) wickra_inverted_hammer_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_inverted_hammer_new(void) { + struct InvertedHammer *h = wickra_inverted_hammer_new(); + if (!h) Rf_error("invalid InvertedHammer parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, inverted_hammer_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_inverted_hammer_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct InvertedHammer *h = (struct InvertedHammer *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_inverted_hammer_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_inverted_hammer_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct InvertedHammer *h = (struct InvertedHammer *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_inverted_hammer_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_inverted_hammer_reset(SEXP e) { + struct InvertedHammer *h = (struct InvertedHammer *)R_ExternalPtrAddr(e); + wickra_inverted_hammer_reset(h); + return R_NilValue; +} + +static void jarque_bera_fin(SEXP e) { + struct JarqueBera *h = (struct JarqueBera *)R_ExternalPtrAddr(e); + if (h) wickra_jarque_bera_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_jarque_bera_new(SEXP a0) { + struct JarqueBera *h = wickra_jarque_bera_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid JarqueBera parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, jarque_bera_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_jarque_bera_update(SEXP e, SEXP a0) { + struct JarqueBera *h = (struct JarqueBera *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_jarque_bera_update(h, Rf_asReal(a0))); +} +SEXP wk_jarque_bera_batch(SEXP e, SEXP a0) { + struct JarqueBera *h = (struct JarqueBera *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_jarque_bera_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_jarque_bera_reset(SEXP e) { + struct JarqueBera *h = (struct JarqueBera *)R_ExternalPtrAddr(e); + wickra_jarque_bera_reset(h); + return R_NilValue; +} + +static void jma_fin(SEXP e) { + struct Jma *h = (struct Jma *)R_ExternalPtrAddr(e); + if (h) wickra_jma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_jma_new(SEXP a0, SEXP a1, SEXP a2) { + struct Jma *h = wickra_jma_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), (uint32_t)Rf_asInteger(a2)); + if (!h) Rf_error("invalid Jma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, jma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_jma_update(SEXP e, SEXP a0) { + struct Jma *h = (struct Jma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_jma_update(h, Rf_asReal(a0))); +} +SEXP wk_jma_batch(SEXP e, SEXP a0) { + struct Jma *h = (struct Jma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_jma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_jma_reset(SEXP e) { + struct Jma *h = (struct Jma *)R_ExternalPtrAddr(e); + wickra_jma_reset(h); + return R_NilValue; +} + +static void jump_indicator_fin(SEXP e) { + struct JumpIndicator *h = (struct JumpIndicator *)R_ExternalPtrAddr(e); + if (h) wickra_jump_indicator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_jump_indicator_new(SEXP a0, SEXP a1) { + struct JumpIndicator *h = wickra_jump_indicator_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid JumpIndicator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, jump_indicator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_jump_indicator_update(SEXP e, SEXP a0) { + struct JumpIndicator *h = (struct JumpIndicator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_jump_indicator_update(h, Rf_asReal(a0))); +} +SEXP wk_jump_indicator_batch(SEXP e, SEXP a0) { + struct JumpIndicator *h = (struct JumpIndicator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_jump_indicator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_jump_indicator_reset(SEXP e) { + struct JumpIndicator *h = (struct JumpIndicator *)R_ExternalPtrAddr(e); + wickra_jump_indicator_reset(h); + return R_NilValue; +} + +static void k_ratio_fin(SEXP e) { + struct KRatio *h = (struct KRatio *)R_ExternalPtrAddr(e); + if (h) wickra_k_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_k_ratio_new(SEXP a0) { + struct KRatio *h = wickra_k_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid KRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, k_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_k_ratio_update(SEXP e, SEXP a0) { + struct KRatio *h = (struct KRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_k_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_k_ratio_batch(SEXP e, SEXP a0) { + struct KRatio *h = (struct KRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_k_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_k_ratio_reset(SEXP e) { + struct KRatio *h = (struct KRatio *)R_ExternalPtrAddr(e); + wickra_k_ratio_reset(h); + return R_NilValue; +} + +static void kagi_bars_fin(SEXP e) { + struct KagiBars *h = (struct KagiBars *)R_ExternalPtrAddr(e); + if (h) wickra_kagi_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kagi_bars_new(SEXP a0) { + struct KagiBars *h = wickra_kagi_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid KagiBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kagi_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kagi_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct KagiBars *h = (struct KagiBars *)R_ExternalPtrAddr(e); + struct WickraKagiBar buf[64]; + size_t n = wickra_kagi_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].start; + REAL(r)[i + n * 1] = (double)buf[i].end; + REAL(r)[i + n * 2] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("start")); + SET_STRING_ELT(cn, 1, Rf_mkChar("end")); + SET_STRING_ELT(cn, 2, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_kagi_bars_reset(SEXP e) { + struct KagiBars *h = (struct KagiBars *)R_ExternalPtrAddr(e); + wickra_kagi_bars_reset(h); + return R_NilValue; +} + +static void kalman_hedge_ratio_fin(SEXP e) { + struct KalmanHedgeRatio *h = (struct KalmanHedgeRatio *)R_ExternalPtrAddr(e); + if (h) wickra_kalman_hedge_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kalman_hedge_ratio_new(SEXP a0, SEXP a1) { + struct KalmanHedgeRatio *h = wickra_kalman_hedge_ratio_new(Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid KalmanHedgeRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kalman_hedge_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kalman_hedge_ratio_update(SEXP e, SEXP a0, SEXP a1) { + struct KalmanHedgeRatio *h = (struct KalmanHedgeRatio *)R_ExternalPtrAddr(e); + struct WickraKalmanHedgeRatioOutput out; + int ok = wickra_kalman_hedge_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.hedge_ratio : NA_REAL; + REAL(r)[1] = ok ? (double)out.intercept : NA_REAL; + REAL(r)[2] = ok ? (double)out.spread : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("hedge_ratio")); + SET_STRING_ELT(nm, 1, Rf_mkChar("intercept")); + SET_STRING_ELT(nm, 2, Rf_mkChar("spread")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_kalman_hedge_ratio_reset(SEXP e) { + struct KalmanHedgeRatio *h = (struct KalmanHedgeRatio *)R_ExternalPtrAddr(e); + wickra_kalman_hedge_ratio_reset(h); + return R_NilValue; +} + +static void kama_fin(SEXP e) { + struct Kama *h = (struct Kama *)R_ExternalPtrAddr(e); + if (h) wickra_kama_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kama_new(SEXP a0, SEXP a1, SEXP a2) { + struct Kama *h = wickra_kama_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid Kama parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kama_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kama_update(SEXP e, SEXP a0) { + struct Kama *h = (struct Kama *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kama_update(h, Rf_asReal(a0))); +} +SEXP wk_kama_batch(SEXP e, SEXP a0) { + struct Kama *h = (struct Kama *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_kama_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kama_reset(SEXP e) { + struct Kama *h = (struct Kama *)R_ExternalPtrAddr(e); + wickra_kama_reset(h); + return R_NilValue; +} + +static void kase_dev_stop_fin(SEXP e) { + struct KaseDevStop *h = (struct KaseDevStop *)R_ExternalPtrAddr(e); + if (h) wickra_kase_dev_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kase_dev_stop_new(SEXP a0, SEXP a1) { + struct KaseDevStop *h = wickra_kase_dev_stop_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid KaseDevStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kase_dev_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kase_dev_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct KaseDevStop *h = (struct KaseDevStop *)R_ExternalPtrAddr(e); + struct WickraKaseDevStopOutput out; + int ok = wickra_kase_dev_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_kase_dev_stop_reset(SEXP e) { + struct KaseDevStop *h = (struct KaseDevStop *)R_ExternalPtrAddr(e); + wickra_kase_dev_stop_reset(h); + return R_NilValue; +} + +static void kase_permission_stochastic_fin(SEXP e) { + struct KasePermissionStochastic *h = (struct KasePermissionStochastic *)R_ExternalPtrAddr(e); + if (h) wickra_kase_permission_stochastic_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kase_permission_stochastic_new(SEXP a0, SEXP a1) { + struct KasePermissionStochastic *h = wickra_kase_permission_stochastic_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid KasePermissionStochastic parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kase_permission_stochastic_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kase_permission_stochastic_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct KasePermissionStochastic *h = (struct KasePermissionStochastic *)R_ExternalPtrAddr(e); + struct WickraKasePermissionStochasticOutput out; + int ok = wickra_kase_permission_stochastic_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.fast : NA_REAL; + REAL(r)[1] = ok ? (double)out.slow : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("fast")); + SET_STRING_ELT(nm, 1, Rf_mkChar("slow")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_kase_permission_stochastic_reset(SEXP e) { + struct KasePermissionStochastic *h = (struct KasePermissionStochastic *)R_ExternalPtrAddr(e); + wickra_kase_permission_stochastic_reset(h); + return R_NilValue; +} + +static void kelly_criterion_fin(SEXP e) { + struct KellyCriterion *h = (struct KellyCriterion *)R_ExternalPtrAddr(e); + if (h) wickra_kelly_criterion_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kelly_criterion_new(SEXP a0) { + struct KellyCriterion *h = wickra_kelly_criterion_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid KellyCriterion parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kelly_criterion_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kelly_criterion_update(SEXP e, SEXP a0) { + struct KellyCriterion *h = (struct KellyCriterion *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kelly_criterion_update(h, Rf_asReal(a0))); +} +SEXP wk_kelly_criterion_batch(SEXP e, SEXP a0) { + struct KellyCriterion *h = (struct KellyCriterion *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_kelly_criterion_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kelly_criterion_reset(SEXP e) { + struct KellyCriterion *h = (struct KellyCriterion *)R_ExternalPtrAddr(e); + wickra_kelly_criterion_reset(h); + return R_NilValue; +} + +static void keltner_fin(SEXP e) { + struct Keltner *h = (struct Keltner *)R_ExternalPtrAddr(e); + if (h) wickra_keltner_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_keltner_new(SEXP a0, SEXP a1, SEXP a2) { + struct Keltner *h = wickra_keltner_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid Keltner parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, keltner_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_keltner_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Keltner *h = (struct Keltner *)R_ExternalPtrAddr(e); + struct WickraKeltnerOutput out; + int ok = wickra_keltner_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_keltner_reset(SEXP e) { + struct Keltner *h = (struct Keltner *)R_ExternalPtrAddr(e); + wickra_keltner_reset(h); + return R_NilValue; +} + +static void kendall_tau_fin(SEXP e) { + struct KendallTau *h = (struct KendallTau *)R_ExternalPtrAddr(e); + if (h) wickra_kendall_tau_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kendall_tau_new(SEXP a0) { + struct KendallTau *h = wickra_kendall_tau_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid KendallTau parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kendall_tau_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kendall_tau_update(SEXP e, SEXP a0, SEXP a1) { + struct KendallTau *h = (struct KendallTau *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kendall_tau_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_kendall_tau_batch(SEXP e, SEXP a0, SEXP a1) { + struct KendallTau *h = (struct KendallTau *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_kendall_tau_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kendall_tau_reset(SEXP e) { + struct KendallTau *h = (struct KendallTau *)R_ExternalPtrAddr(e); + wickra_kendall_tau_reset(h); + return R_NilValue; +} + +static void kicking_fin(SEXP e) { + struct Kicking *h = (struct Kicking *)R_ExternalPtrAddr(e); + if (h) wickra_kicking_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kicking_new(void) { + struct Kicking *h = wickra_kicking_new(); + if (!h) Rf_error("invalid Kicking parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kicking_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kicking_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Kicking *h = (struct Kicking *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kicking_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_kicking_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Kicking *h = (struct Kicking *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_kicking_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kicking_reset(SEXP e) { + struct Kicking *h = (struct Kicking *)R_ExternalPtrAddr(e); + wickra_kicking_reset(h); + return R_NilValue; +} + +static void kicking_by_length_fin(SEXP e) { + struct KickingByLength *h = (struct KickingByLength *)R_ExternalPtrAddr(e); + if (h) wickra_kicking_by_length_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kicking_by_length_new(void) { + struct KickingByLength *h = wickra_kicking_by_length_new(); + if (!h) Rf_error("invalid KickingByLength parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kicking_by_length_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kicking_by_length_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct KickingByLength *h = (struct KickingByLength *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kicking_by_length_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_kicking_by_length_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct KickingByLength *h = (struct KickingByLength *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_kicking_by_length_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kicking_by_length_reset(SEXP e) { + struct KickingByLength *h = (struct KickingByLength *)R_ExternalPtrAddr(e); + wickra_kicking_by_length_reset(h); + return R_NilValue; +} + +static void kst_fin(SEXP e) { + struct Kst *h = (struct Kst *)R_ExternalPtrAddr(e); + if (h) wickra_kst_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kst_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8) { + struct Kst *h = wickra_kst_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3), (uintptr_t)Rf_asReal(a4), (uintptr_t)Rf_asReal(a5), (uintptr_t)Rf_asReal(a6), (uintptr_t)Rf_asReal(a7), (uintptr_t)Rf_asReal(a8)); + if (!h) Rf_error("invalid Kst parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kst_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kst_update(SEXP e, SEXP a0) { + struct Kst *h = (struct Kst *)R_ExternalPtrAddr(e); + struct WickraKstOutput out; + int ok = wickra_kst_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.kst : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("kst")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_kst_reset(SEXP e) { + struct Kst *h = (struct Kst *)R_ExternalPtrAddr(e); + wickra_kst_reset(h); + return R_NilValue; +} + +static void kurtosis_fin(SEXP e) { + struct Kurtosis *h = (struct Kurtosis *)R_ExternalPtrAddr(e); + if (h) wickra_kurtosis_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kurtosis_new(SEXP a0) { + struct Kurtosis *h = wickra_kurtosis_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Kurtosis parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kurtosis_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kurtosis_update(SEXP e, SEXP a0) { + struct Kurtosis *h = (struct Kurtosis *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kurtosis_update(h, Rf_asReal(a0))); +} +SEXP wk_kurtosis_batch(SEXP e, SEXP a0) { + struct Kurtosis *h = (struct Kurtosis *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_kurtosis_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kurtosis_reset(SEXP e) { + struct Kurtosis *h = (struct Kurtosis *)R_ExternalPtrAddr(e); + wickra_kurtosis_reset(h); + return R_NilValue; +} + +static void kvo_fin(SEXP e) { + struct Kvo *h = (struct Kvo *)R_ExternalPtrAddr(e); + if (h) wickra_kvo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kvo_new(SEXP a0, SEXP a1) { + struct Kvo *h = wickra_kvo_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Kvo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kvo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kvo_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Kvo *h = (struct Kvo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kvo_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_kvo_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Kvo *h = (struct Kvo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_kvo_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_kvo_reset(SEXP e) { + struct Kvo *h = (struct Kvo *)R_ExternalPtrAddr(e); + wickra_kvo_reset(h); + return R_NilValue; +} + +static void kyles_lambda_fin(SEXP e) { + struct KylesLambda *h = (struct KylesLambda *)R_ExternalPtrAddr(e); + if (h) wickra_kyles_lambda_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_kyles_lambda_new(SEXP a0) { + struct KylesLambda *h = wickra_kyles_lambda_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid KylesLambda parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, kyles_lambda_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_kyles_lambda_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4) { + struct KylesLambda *h = (struct KylesLambda *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_kyles_lambda_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3), Rf_asReal(a4))); +} +SEXP wk_kyles_lambda_reset(SEXP e) { + struct KylesLambda *h = (struct KylesLambda *)R_ExternalPtrAddr(e); + wickra_kyles_lambda_reset(h); + return R_NilValue; +} + +static void ladder_bottom_fin(SEXP e) { + struct LadderBottom *h = (struct LadderBottom *)R_ExternalPtrAddr(e); + if (h) wickra_ladder_bottom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ladder_bottom_new(void) { + struct LadderBottom *h = wickra_ladder_bottom_new(); + if (!h) Rf_error("invalid LadderBottom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ladder_bottom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ladder_bottom_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LadderBottom *h = (struct LadderBottom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ladder_bottom_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_ladder_bottom_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LadderBottom *h = (struct LadderBottom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_ladder_bottom_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ladder_bottom_reset(SEXP e) { + struct LadderBottom *h = (struct LadderBottom *)R_ExternalPtrAddr(e); + wickra_ladder_bottom_reset(h); + return R_NilValue; +} + +static void laguerre_rsi_fin(SEXP e) { + struct LaguerreRsi *h = (struct LaguerreRsi *)R_ExternalPtrAddr(e); + if (h) wickra_laguerre_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_laguerre_rsi_new(SEXP a0) { + struct LaguerreRsi *h = wickra_laguerre_rsi_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid LaguerreRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, laguerre_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_laguerre_rsi_update(SEXP e, SEXP a0) { + struct LaguerreRsi *h = (struct LaguerreRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_laguerre_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_laguerre_rsi_batch(SEXP e, SEXP a0) { + struct LaguerreRsi *h = (struct LaguerreRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_laguerre_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_laguerre_rsi_reset(SEXP e) { + struct LaguerreRsi *h = (struct LaguerreRsi *)R_ExternalPtrAddr(e); + wickra_laguerre_rsi_reset(h); + return R_NilValue; +} + +static void lead_lag_cross_correlation_fin(SEXP e) { + struct LeadLagCrossCorrelation *h = (struct LeadLagCrossCorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_lead_lag_cross_correlation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_lead_lag_cross_correlation_new(SEXP a0, SEXP a1) { + struct LeadLagCrossCorrelation *h = wickra_lead_lag_cross_correlation_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid LeadLagCrossCorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, lead_lag_cross_correlation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_lead_lag_cross_correlation_update(SEXP e, SEXP a0, SEXP a1) { + struct LeadLagCrossCorrelation *h = (struct LeadLagCrossCorrelation *)R_ExternalPtrAddr(e); + struct WickraLeadLagCrossCorrelationOutput out; + int ok = wickra_lead_lag_cross_correlation_update(h, Rf_asReal(a0), Rf_asReal(a1), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.lag : NA_REAL; + REAL(r)[1] = ok ? (double)out.correlation : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("lag")); + SET_STRING_ELT(nm, 1, Rf_mkChar("correlation")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_lead_lag_cross_correlation_reset(SEXP e) { + struct LeadLagCrossCorrelation *h = (struct LeadLagCrossCorrelation *)R_ExternalPtrAddr(e); + wickra_lead_lag_cross_correlation_reset(h); + return R_NilValue; +} + +static void lin_reg_angle_fin(SEXP e) { + struct LinRegAngle *h = (struct LinRegAngle *)R_ExternalPtrAddr(e); + if (h) wickra_lin_reg_angle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_lin_reg_angle_new(SEXP a0) { + struct LinRegAngle *h = wickra_lin_reg_angle_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid LinRegAngle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, lin_reg_angle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_lin_reg_angle_update(SEXP e, SEXP a0) { + struct LinRegAngle *h = (struct LinRegAngle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_lin_reg_angle_update(h, Rf_asReal(a0))); +} +SEXP wk_lin_reg_angle_batch(SEXP e, SEXP a0) { + struct LinRegAngle *h = (struct LinRegAngle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_lin_reg_angle_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_lin_reg_angle_reset(SEXP e) { + struct LinRegAngle *h = (struct LinRegAngle *)R_ExternalPtrAddr(e); + wickra_lin_reg_angle_reset(h); + return R_NilValue; +} + +static void lin_reg_channel_fin(SEXP e) { + struct LinRegChannel *h = (struct LinRegChannel *)R_ExternalPtrAddr(e); + if (h) wickra_lin_reg_channel_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_lin_reg_channel_new(SEXP a0, SEXP a1) { + struct LinRegChannel *h = wickra_lin_reg_channel_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid LinRegChannel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, lin_reg_channel_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_lin_reg_channel_update(SEXP e, SEXP a0) { + struct LinRegChannel *h = (struct LinRegChannel *)R_ExternalPtrAddr(e); + struct WickraLinRegChannelOutput out; + int ok = wickra_lin_reg_channel_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_lin_reg_channel_reset(SEXP e) { + struct LinRegChannel *h = (struct LinRegChannel *)R_ExternalPtrAddr(e); + wickra_lin_reg_channel_reset(h); + return R_NilValue; +} + +static void lin_reg_intercept_fin(SEXP e) { + struct LinRegIntercept *h = (struct LinRegIntercept *)R_ExternalPtrAddr(e); + if (h) wickra_lin_reg_intercept_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_lin_reg_intercept_new(SEXP a0) { + struct LinRegIntercept *h = wickra_lin_reg_intercept_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid LinRegIntercept parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, lin_reg_intercept_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_lin_reg_intercept_update(SEXP e, SEXP a0) { + struct LinRegIntercept *h = (struct LinRegIntercept *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_lin_reg_intercept_update(h, Rf_asReal(a0))); +} +SEXP wk_lin_reg_intercept_batch(SEXP e, SEXP a0) { + struct LinRegIntercept *h = (struct LinRegIntercept *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_lin_reg_intercept_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_lin_reg_intercept_reset(SEXP e) { + struct LinRegIntercept *h = (struct LinRegIntercept *)R_ExternalPtrAddr(e); + wickra_lin_reg_intercept_reset(h); + return R_NilValue; +} + +static void lin_reg_slope_fin(SEXP e) { + struct LinRegSlope *h = (struct LinRegSlope *)R_ExternalPtrAddr(e); + if (h) wickra_lin_reg_slope_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_lin_reg_slope_new(SEXP a0) { + struct LinRegSlope *h = wickra_lin_reg_slope_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid LinRegSlope parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, lin_reg_slope_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_lin_reg_slope_update(SEXP e, SEXP a0) { + struct LinRegSlope *h = (struct LinRegSlope *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_lin_reg_slope_update(h, Rf_asReal(a0))); +} +SEXP wk_lin_reg_slope_batch(SEXP e, SEXP a0) { + struct LinRegSlope *h = (struct LinRegSlope *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_lin_reg_slope_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_lin_reg_slope_reset(SEXP e) { + struct LinRegSlope *h = (struct LinRegSlope *)R_ExternalPtrAddr(e); + wickra_lin_reg_slope_reset(h); + return R_NilValue; +} + +static void linear_regression_fin(SEXP e) { + struct LinearRegression *h = (struct LinearRegression *)R_ExternalPtrAddr(e); + if (h) wickra_linear_regression_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_linear_regression_new(SEXP a0) { + struct LinearRegression *h = wickra_linear_regression_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid LinearRegression parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, linear_regression_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_linear_regression_update(SEXP e, SEXP a0) { + struct LinearRegression *h = (struct LinearRegression *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_linear_regression_update(h, Rf_asReal(a0))); +} +SEXP wk_linear_regression_batch(SEXP e, SEXP a0) { + struct LinearRegression *h = (struct LinearRegression *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_linear_regression_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_linear_regression_reset(SEXP e) { + struct LinearRegression *h = (struct LinearRegression *)R_ExternalPtrAddr(e); + wickra_linear_regression_reset(h); + return R_NilValue; +} + +static void liquidation_features_fin(SEXP e) { + struct LiquidationFeatures *h = (struct LiquidationFeatures *)R_ExternalPtrAddr(e); + if (h) wickra_liquidation_features_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_liquidation_features_new(void) { + struct LiquidationFeatures *h = wickra_liquidation_features_new(); + if (!h) Rf_error("invalid LiquidationFeatures parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, liquidation_features_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_liquidation_features_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct LiquidationFeatures *h = (struct LiquidationFeatures *)R_ExternalPtrAddr(e); + struct WickraLiquidationFeaturesOutput out; + int ok = wickra_liquidation_features_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.long_ : NA_REAL; + REAL(r)[1] = ok ? (double)out.short_ : NA_REAL; + REAL(r)[2] = ok ? (double)out.net : NA_REAL; + REAL(r)[3] = ok ? (double)out.total : NA_REAL; + REAL(r)[4] = ok ? (double)out.imbalance : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("long_")); + SET_STRING_ELT(nm, 1, Rf_mkChar("short_")); + SET_STRING_ELT(nm, 2, Rf_mkChar("net")); + SET_STRING_ELT(nm, 3, Rf_mkChar("total")); + SET_STRING_ELT(nm, 4, Rf_mkChar("imbalance")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_liquidation_features_reset(SEXP e) { + struct LiquidationFeatures *h = (struct LiquidationFeatures *)R_ExternalPtrAddr(e); + wickra_liquidation_features_reset(h); + return R_NilValue; +} + +static void log_return_fin(SEXP e) { + struct LogReturn *h = (struct LogReturn *)R_ExternalPtrAddr(e); + if (h) wickra_log_return_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_log_return_new(SEXP a0) { + struct LogReturn *h = wickra_log_return_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid LogReturn parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, log_return_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_log_return_update(SEXP e, SEXP a0) { + struct LogReturn *h = (struct LogReturn *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_log_return_update(h, Rf_asReal(a0))); +} +SEXP wk_log_return_batch(SEXP e, SEXP a0) { + struct LogReturn *h = (struct LogReturn *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_log_return_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_log_return_reset(SEXP e) { + struct LogReturn *h = (struct LogReturn *)R_ExternalPtrAddr(e); + wickra_log_return_reset(h); + return R_NilValue; +} + +static void long_legged_doji_fin(SEXP e) { + struct LongLeggedDoji *h = (struct LongLeggedDoji *)R_ExternalPtrAddr(e); + if (h) wickra_long_legged_doji_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_long_legged_doji_new(void) { + struct LongLeggedDoji *h = wickra_long_legged_doji_new(); + if (!h) Rf_error("invalid LongLeggedDoji parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, long_legged_doji_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_long_legged_doji_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LongLeggedDoji *h = (struct LongLeggedDoji *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_long_legged_doji_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_long_legged_doji_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LongLeggedDoji *h = (struct LongLeggedDoji *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_long_legged_doji_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_long_legged_doji_reset(SEXP e) { + struct LongLeggedDoji *h = (struct LongLeggedDoji *)R_ExternalPtrAddr(e); + wickra_long_legged_doji_reset(h); + return R_NilValue; +} + +static void long_line_fin(SEXP e) { + struct LongLine *h = (struct LongLine *)R_ExternalPtrAddr(e); + if (h) wickra_long_line_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_long_line_new(void) { + struct LongLine *h = wickra_long_line_new(); + if (!h) Rf_error("invalid LongLine parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, long_line_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_long_line_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LongLine *h = (struct LongLine *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_long_line_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_long_line_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct LongLine *h = (struct LongLine *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_long_line_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_long_line_reset(SEXP e) { + struct LongLine *h = (struct LongLine *)R_ExternalPtrAddr(e); + wickra_long_line_reset(h); + return R_NilValue; +} + +static void long_short_ratio_fin(SEXP e) { + struct LongShortRatio *h = (struct LongShortRatio *)R_ExternalPtrAddr(e); + if (h) wickra_long_short_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_long_short_ratio_new(void) { + struct LongShortRatio *h = wickra_long_short_ratio_new(); + if (!h) Rf_error("invalid LongShortRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, long_short_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_long_short_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct LongShortRatio *h = (struct LongShortRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_long_short_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_long_short_ratio_reset(SEXP e) { + struct LongShortRatio *h = (struct LongShortRatio *)R_ExternalPtrAddr(e); + wickra_long_short_ratio_reset(h); + return R_NilValue; +} + +static void m2_measure_fin(SEXP e) { + struct M2Measure *h = (struct M2Measure *)R_ExternalPtrAddr(e); + if (h) wickra_m2_measure_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_m2_measure_new(SEXP a0, SEXP a1, SEXP a2) { + struct M2Measure *h = wickra_m2_measure_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid M2Measure parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, m2_measure_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_m2_measure_update(SEXP e, SEXP a0) { + struct M2Measure *h = (struct M2Measure *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_m2_measure_update(h, Rf_asReal(a0))); +} +SEXP wk_m2_measure_batch(SEXP e, SEXP a0) { + struct M2Measure *h = (struct M2Measure *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_m2_measure_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_m2_measure_reset(SEXP e) { + struct M2Measure *h = (struct M2Measure *)R_ExternalPtrAddr(e); + wickra_m2_measure_reset(h); + return R_NilValue; +} + +static void ma_envelope_fin(SEXP e) { + struct MaEnvelope *h = (struct MaEnvelope *)R_ExternalPtrAddr(e); + if (h) wickra_ma_envelope_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ma_envelope_new(SEXP a0, SEXP a1) { + struct MaEnvelope *h = wickra_ma_envelope_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid MaEnvelope parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ma_envelope_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ma_envelope_update(SEXP e, SEXP a0) { + struct MaEnvelope *h = (struct MaEnvelope *)R_ExternalPtrAddr(e); + struct WickraMaEnvelopeOutput out; + int ok = wickra_ma_envelope_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_ma_envelope_reset(SEXP e) { + struct MaEnvelope *h = (struct MaEnvelope *)R_ExternalPtrAddr(e); + wickra_ma_envelope_reset(h); + return R_NilValue; +} + +static void macd_ext_fin(SEXP e) { + struct MacdExt *h = (struct MacdExt *)R_ExternalPtrAddr(e); + if (h) wickra_macd_ext_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_macd_ext_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MacdExt *h = wickra_macd_ext_new((uintptr_t)Rf_asReal(a0), (uint8_t)Rf_asInteger(a1), (uintptr_t)Rf_asReal(a2), (uint8_t)Rf_asInteger(a3), (uintptr_t)Rf_asReal(a4), (uint8_t)Rf_asInteger(a5)); + if (!h) Rf_error("invalid MacdExt parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, macd_ext_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_macd_ext_update(SEXP e, SEXP a0) { + struct MacdExt *h = (struct MacdExt *)R_ExternalPtrAddr(e); + struct WickraMacdOutput out; + int ok = wickra_macd_ext_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.macd : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + REAL(r)[2] = ok ? (double)out.histogram : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("macd")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + SET_STRING_ELT(nm, 2, Rf_mkChar("histogram")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_macd_ext_reset(SEXP e) { + struct MacdExt *h = (struct MacdExt *)R_ExternalPtrAddr(e); + wickra_macd_ext_reset(h); + return R_NilValue; +} + +static void macd_fix_fin(SEXP e) { + struct MacdFix *h = (struct MacdFix *)R_ExternalPtrAddr(e); + if (h) wickra_macd_fix_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_macd_fix_new(SEXP a0) { + struct MacdFix *h = wickra_macd_fix_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MacdFix parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, macd_fix_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_macd_fix_update(SEXP e, SEXP a0) { + struct MacdFix *h = (struct MacdFix *)R_ExternalPtrAddr(e); + struct WickraMacdOutput out; + int ok = wickra_macd_fix_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.macd : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + REAL(r)[2] = ok ? (double)out.histogram : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("macd")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + SET_STRING_ELT(nm, 2, Rf_mkChar("histogram")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_macd_fix_reset(SEXP e) { + struct MacdFix *h = (struct MacdFix *)R_ExternalPtrAddr(e); + wickra_macd_fix_reset(h); + return R_NilValue; +} + +static void macd_histogram_fin(SEXP e) { + struct MacdHistogram *h = (struct MacdHistogram *)R_ExternalPtrAddr(e); + if (h) wickra_macd_histogram_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_macd_histogram_new(SEXP a0, SEXP a1, SEXP a2) { + struct MacdHistogram *h = wickra_macd_histogram_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid MacdHistogram parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, macd_histogram_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_macd_histogram_update(SEXP e, SEXP a0) { + struct MacdHistogram *h = (struct MacdHistogram *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_macd_histogram_update(h, Rf_asReal(a0))); +} +SEXP wk_macd_histogram_batch(SEXP e, SEXP a0) { + struct MacdHistogram *h = (struct MacdHistogram *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_macd_histogram_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_macd_histogram_reset(SEXP e) { + struct MacdHistogram *h = (struct MacdHistogram *)R_ExternalPtrAddr(e); + wickra_macd_histogram_reset(h); + return R_NilValue; +} + +static void macd_indicator_fin(SEXP e) { + struct MacdIndicator *h = (struct MacdIndicator *)R_ExternalPtrAddr(e); + if (h) wickra_macd_indicator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_macd_indicator_new(SEXP a0, SEXP a1, SEXP a2) { + struct MacdIndicator *h = wickra_macd_indicator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid MacdIndicator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, macd_indicator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_macd_indicator_update(SEXP e, SEXP a0) { + struct MacdIndicator *h = (struct MacdIndicator *)R_ExternalPtrAddr(e); + struct WickraMacdOutput out; + int ok = wickra_macd_indicator_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.macd : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + REAL(r)[2] = ok ? (double)out.histogram : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("macd")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + SET_STRING_ELT(nm, 2, Rf_mkChar("histogram")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_macd_indicator_reset(SEXP e) { + struct MacdIndicator *h = (struct MacdIndicator *)R_ExternalPtrAddr(e); + wickra_macd_indicator_reset(h); + return R_NilValue; +} + +static void mama_fin(SEXP e) { + struct Mama *h = (struct Mama *)R_ExternalPtrAddr(e); + if (h) wickra_mama_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mama_new(SEXP a0, SEXP a1) { + struct Mama *h = wickra_mama_new(Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid Mama parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mama_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mama_update(SEXP e, SEXP a0) { + struct Mama *h = (struct Mama *)R_ExternalPtrAddr(e); + struct WickraMamaOutput out; + int ok = wickra_mama_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.mama : NA_REAL; + REAL(r)[1] = ok ? (double)out.fama : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("mama")); + SET_STRING_ELT(nm, 1, Rf_mkChar("fama")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_mama_reset(SEXP e) { + struct Mama *h = (struct Mama *)R_ExternalPtrAddr(e); + wickra_mama_reset(h); + return R_NilValue; +} + +static void market_facilitation_index_fin(SEXP e) { + struct MarketFacilitationIndex *h = (struct MarketFacilitationIndex *)R_ExternalPtrAddr(e); + if (h) wickra_market_facilitation_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_market_facilitation_index_new(void) { + struct MarketFacilitationIndex *h = wickra_market_facilitation_index_new(); + if (!h) Rf_error("invalid MarketFacilitationIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, market_facilitation_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_market_facilitation_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MarketFacilitationIndex *h = (struct MarketFacilitationIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_market_facilitation_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_market_facilitation_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MarketFacilitationIndex *h = (struct MarketFacilitationIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_market_facilitation_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_market_facilitation_index_reset(SEXP e) { + struct MarketFacilitationIndex *h = (struct MarketFacilitationIndex *)R_ExternalPtrAddr(e); + wickra_market_facilitation_index_reset(h); + return R_NilValue; +} + +static void martin_ratio_fin(SEXP e) { + struct MartinRatio *h = (struct MartinRatio *)R_ExternalPtrAddr(e); + if (h) wickra_martin_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_martin_ratio_new(SEXP a0) { + struct MartinRatio *h = wickra_martin_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MartinRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, martin_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_martin_ratio_update(SEXP e, SEXP a0) { + struct MartinRatio *h = (struct MartinRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_martin_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_martin_ratio_batch(SEXP e, SEXP a0) { + struct MartinRatio *h = (struct MartinRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_martin_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_martin_ratio_reset(SEXP e) { + struct MartinRatio *h = (struct MartinRatio *)R_ExternalPtrAddr(e); + wickra_martin_ratio_reset(h); + return R_NilValue; +} + +static void marubozu_fin(SEXP e) { + struct Marubozu *h = (struct Marubozu *)R_ExternalPtrAddr(e); + if (h) wickra_marubozu_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_marubozu_new(void) { + struct Marubozu *h = wickra_marubozu_new(); + if (!h) Rf_error("invalid Marubozu parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, marubozu_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_marubozu_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Marubozu *h = (struct Marubozu *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_marubozu_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_marubozu_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Marubozu *h = (struct Marubozu *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_marubozu_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_marubozu_reset(SEXP e) { + struct Marubozu *h = (struct Marubozu *)R_ExternalPtrAddr(e); + wickra_marubozu_reset(h); + return R_NilValue; +} + +static void mass_index_fin(SEXP e) { + struct MassIndex *h = (struct MassIndex *)R_ExternalPtrAddr(e); + if (h) wickra_mass_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mass_index_new(SEXP a0, SEXP a1) { + struct MassIndex *h = wickra_mass_index_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid MassIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mass_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mass_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MassIndex *h = (struct MassIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mass_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_mass_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MassIndex *h = (struct MassIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_mass_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mass_index_reset(SEXP e) { + struct MassIndex *h = (struct MassIndex *)R_ExternalPtrAddr(e); + wickra_mass_index_reset(h); + return R_NilValue; +} + +static void mat_hold_fin(SEXP e) { + struct MatHold *h = (struct MatHold *)R_ExternalPtrAddr(e); + if (h) wickra_mat_hold_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mat_hold_new(void) { + struct MatHold *h = wickra_mat_hold_new(); + if (!h) Rf_error("invalid MatHold parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mat_hold_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mat_hold_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MatHold *h = (struct MatHold *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mat_hold_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_mat_hold_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MatHold *h = (struct MatHold *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_mat_hold_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mat_hold_reset(SEXP e) { + struct MatHold *h = (struct MatHold *)R_ExternalPtrAddr(e); + wickra_mat_hold_reset(h); + return R_NilValue; +} + +static void matching_low_fin(SEXP e) { + struct MatchingLow *h = (struct MatchingLow *)R_ExternalPtrAddr(e); + if (h) wickra_matching_low_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_matching_low_new(void) { + struct MatchingLow *h = wickra_matching_low_new(); + if (!h) Rf_error("invalid MatchingLow parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, matching_low_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_matching_low_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MatchingLow *h = (struct MatchingLow *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_matching_low_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_matching_low_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MatchingLow *h = (struct MatchingLow *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_matching_low_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_matching_low_reset(SEXP e) { + struct MatchingLow *h = (struct MatchingLow *)R_ExternalPtrAddr(e); + wickra_matching_low_reset(h); + return R_NilValue; +} + +static void max_drawdown_fin(SEXP e) { + struct MaxDrawdown *h = (struct MaxDrawdown *)R_ExternalPtrAddr(e); + if (h) wickra_max_drawdown_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_max_drawdown_new(SEXP a0) { + struct MaxDrawdown *h = wickra_max_drawdown_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MaxDrawdown parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, max_drawdown_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_max_drawdown_update(SEXP e, SEXP a0) { + struct MaxDrawdown *h = (struct MaxDrawdown *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_max_drawdown_update(h, Rf_asReal(a0))); +} +SEXP wk_max_drawdown_batch(SEXP e, SEXP a0) { + struct MaxDrawdown *h = (struct MaxDrawdown *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_max_drawdown_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_max_drawdown_reset(SEXP e) { + struct MaxDrawdown *h = (struct MaxDrawdown *)R_ExternalPtrAddr(e); + wickra_max_drawdown_reset(h); + return R_NilValue; +} + +static void mc_clellan_oscillator_fin(SEXP e) { + struct McClellanOscillator *h = (struct McClellanOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_mc_clellan_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mc_clellan_oscillator_new(void) { + struct McClellanOscillator *h = wickra_mc_clellan_oscillator_new(); + if (!h) Rf_error("invalid McClellanOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mc_clellan_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mc_clellan_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct McClellanOscillator *h = (struct McClellanOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mc_clellan_oscillator_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_mc_clellan_oscillator_reset(SEXP e) { + struct McClellanOscillator *h = (struct McClellanOscillator *)R_ExternalPtrAddr(e); + wickra_mc_clellan_oscillator_reset(h); + return R_NilValue; +} + +static void mc_clellan_summation_index_fin(SEXP e) { + struct McClellanSummationIndex *h = (struct McClellanSummationIndex *)R_ExternalPtrAddr(e); + if (h) wickra_mc_clellan_summation_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mc_clellan_summation_index_new(void) { + struct McClellanSummationIndex *h = wickra_mc_clellan_summation_index_new(); + if (!h) Rf_error("invalid McClellanSummationIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mc_clellan_summation_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mc_clellan_summation_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct McClellanSummationIndex *h = (struct McClellanSummationIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mc_clellan_summation_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_mc_clellan_summation_index_reset(SEXP e) { + struct McClellanSummationIndex *h = (struct McClellanSummationIndex *)R_ExternalPtrAddr(e); + wickra_mc_clellan_summation_index_reset(h); + return R_NilValue; +} + +static void mc_ginley_dynamic_fin(SEXP e) { + struct McGinleyDynamic *h = (struct McGinleyDynamic *)R_ExternalPtrAddr(e); + if (h) wickra_mc_ginley_dynamic_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mc_ginley_dynamic_new(SEXP a0) { + struct McGinleyDynamic *h = wickra_mc_ginley_dynamic_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid McGinleyDynamic parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mc_ginley_dynamic_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mc_ginley_dynamic_update(SEXP e, SEXP a0) { + struct McGinleyDynamic *h = (struct McGinleyDynamic *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mc_ginley_dynamic_update(h, Rf_asReal(a0))); +} +SEXP wk_mc_ginley_dynamic_batch(SEXP e, SEXP a0) { + struct McGinleyDynamic *h = (struct McGinleyDynamic *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_mc_ginley_dynamic_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mc_ginley_dynamic_reset(SEXP e) { + struct McGinleyDynamic *h = (struct McGinleyDynamic *)R_ExternalPtrAddr(e); + wickra_mc_ginley_dynamic_reset(h); + return R_NilValue; +} + +static void median_absolute_deviation_fin(SEXP e) { + struct MedianAbsoluteDeviation *h = (struct MedianAbsoluteDeviation *)R_ExternalPtrAddr(e); + if (h) wickra_median_absolute_deviation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_median_absolute_deviation_new(SEXP a0) { + struct MedianAbsoluteDeviation *h = wickra_median_absolute_deviation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MedianAbsoluteDeviation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, median_absolute_deviation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_median_absolute_deviation_update(SEXP e, SEXP a0) { + struct MedianAbsoluteDeviation *h = (struct MedianAbsoluteDeviation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_median_absolute_deviation_update(h, Rf_asReal(a0))); +} +SEXP wk_median_absolute_deviation_batch(SEXP e, SEXP a0) { + struct MedianAbsoluteDeviation *h = (struct MedianAbsoluteDeviation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_median_absolute_deviation_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_median_absolute_deviation_reset(SEXP e) { + struct MedianAbsoluteDeviation *h = (struct MedianAbsoluteDeviation *)R_ExternalPtrAddr(e); + wickra_median_absolute_deviation_reset(h); + return R_NilValue; +} + +static void median_channel_fin(SEXP e) { + struct MedianChannel *h = (struct MedianChannel *)R_ExternalPtrAddr(e); + if (h) wickra_median_channel_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_median_channel_new(SEXP a0, SEXP a1) { + struct MedianChannel *h = wickra_median_channel_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid MedianChannel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, median_channel_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_median_channel_update(SEXP e, SEXP a0) { + struct MedianChannel *h = (struct MedianChannel *)R_ExternalPtrAddr(e); + struct WickraMedianChannelOutput out; + int ok = wickra_median_channel_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_median_channel_reset(SEXP e) { + struct MedianChannel *h = (struct MedianChannel *)R_ExternalPtrAddr(e); + wickra_median_channel_reset(h); + return R_NilValue; +} + +static void median_ma_fin(SEXP e) { + struct MedianMa *h = (struct MedianMa *)R_ExternalPtrAddr(e); + if (h) wickra_median_ma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_median_ma_new(SEXP a0) { + struct MedianMa *h = wickra_median_ma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MedianMa parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, median_ma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_median_ma_update(SEXP e, SEXP a0) { + struct MedianMa *h = (struct MedianMa *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_median_ma_update(h, Rf_asReal(a0))); +} +SEXP wk_median_ma_batch(SEXP e, SEXP a0) { + struct MedianMa *h = (struct MedianMa *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_median_ma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_median_ma_reset(SEXP e) { + struct MedianMa *h = (struct MedianMa *)R_ExternalPtrAddr(e); + wickra_median_ma_reset(h); + return R_NilValue; +} + +static void median_price_fin(SEXP e) { + struct MedianPrice *h = (struct MedianPrice *)R_ExternalPtrAddr(e); + if (h) wickra_median_price_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_median_price_new(void) { + struct MedianPrice *h = wickra_median_price_new(); + if (!h) Rf_error("invalid MedianPrice parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, median_price_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_median_price_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MedianPrice *h = (struct MedianPrice *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_median_price_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_median_price_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MedianPrice *h = (struct MedianPrice *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_median_price_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_median_price_reset(SEXP e) { + struct MedianPrice *h = (struct MedianPrice *)R_ExternalPtrAddr(e); + wickra_median_price_reset(h); + return R_NilValue; +} + +static void mfi_fin(SEXP e) { + struct Mfi *h = (struct Mfi *)R_ExternalPtrAddr(e); + if (h) wickra_mfi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mfi_new(SEXP a0) { + struct Mfi *h = wickra_mfi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Mfi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mfi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mfi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Mfi *h = (struct Mfi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mfi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_mfi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Mfi *h = (struct Mfi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_mfi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mfi_reset(SEXP e) { + struct Mfi *h = (struct Mfi *)R_ExternalPtrAddr(e); + wickra_mfi_reset(h); + return R_NilValue; +} + +static void microprice_fin(SEXP e) { + struct Microprice *h = (struct Microprice *)R_ExternalPtrAddr(e); + if (h) wickra_microprice_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_microprice_new(void) { + struct Microprice *h = wickra_microprice_new(); + if (!h) Rf_error("invalid Microprice parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, microprice_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_microprice_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Microprice *h = (struct Microprice *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_microprice_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_microprice_reset(SEXP e) { + struct Microprice *h = (struct Microprice *)R_ExternalPtrAddr(e); + wickra_microprice_reset(h); + return R_NilValue; +} + +static void mid_point_fin(SEXP e) { + struct MidPoint *h = (struct MidPoint *)R_ExternalPtrAddr(e); + if (h) wickra_mid_point_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mid_point_new(SEXP a0) { + struct MidPoint *h = wickra_mid_point_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MidPoint parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mid_point_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mid_point_update(SEXP e, SEXP a0) { + struct MidPoint *h = (struct MidPoint *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mid_point_update(h, Rf_asReal(a0))); +} +SEXP wk_mid_point_batch(SEXP e, SEXP a0) { + struct MidPoint *h = (struct MidPoint *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_mid_point_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mid_point_reset(SEXP e) { + struct MidPoint *h = (struct MidPoint *)R_ExternalPtrAddr(e); + wickra_mid_point_reset(h); + return R_NilValue; +} + +static void mid_price_fin(SEXP e) { + struct MidPrice *h = (struct MidPrice *)R_ExternalPtrAddr(e); + if (h) wickra_mid_price_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mid_price_new(SEXP a0) { + struct MidPrice *h = wickra_mid_price_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MidPrice parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mid_price_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mid_price_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MidPrice *h = (struct MidPrice *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mid_price_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_mid_price_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MidPrice *h = (struct MidPrice *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_mid_price_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mid_price_reset(SEXP e) { + struct MidPrice *h = (struct MidPrice *)R_ExternalPtrAddr(e); + wickra_mid_price_reset(h); + return R_NilValue; +} + +static void minus_di_fin(SEXP e) { + struct MinusDi *h = (struct MinusDi *)R_ExternalPtrAddr(e); + if (h) wickra_minus_di_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_minus_di_new(SEXP a0) { + struct MinusDi *h = wickra_minus_di_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MinusDi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, minus_di_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_minus_di_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MinusDi *h = (struct MinusDi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_minus_di_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_minus_di_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MinusDi *h = (struct MinusDi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_minus_di_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_minus_di_reset(SEXP e) { + struct MinusDi *h = (struct MinusDi *)R_ExternalPtrAddr(e); + wickra_minus_di_reset(h); + return R_NilValue; +} + +static void minus_dm_fin(SEXP e) { + struct MinusDm *h = (struct MinusDm *)R_ExternalPtrAddr(e); + if (h) wickra_minus_dm_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_minus_dm_new(SEXP a0) { + struct MinusDm *h = wickra_minus_dm_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MinusDm parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, minus_dm_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_minus_dm_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MinusDm *h = (struct MinusDm *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_minus_dm_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_minus_dm_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MinusDm *h = (struct MinusDm *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_minus_dm_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_minus_dm_reset(SEXP e) { + struct MinusDm *h = (struct MinusDm *)R_ExternalPtrAddr(e); + wickra_minus_dm_reset(h); + return R_NilValue; +} + +static void modified_ma_stop_fin(SEXP e) { + struct ModifiedMaStop *h = (struct ModifiedMaStop *)R_ExternalPtrAddr(e); + if (h) wickra_modified_ma_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_modified_ma_stop_new(SEXP a0) { + struct ModifiedMaStop *h = wickra_modified_ma_stop_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ModifiedMaStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, modified_ma_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_modified_ma_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ModifiedMaStop *h = (struct ModifiedMaStop *)R_ExternalPtrAddr(e); + struct WickraModifiedMaStopOutput out; + int ok = wickra_modified_ma_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_modified_ma_stop_reset(SEXP e) { + struct ModifiedMaStop *h = (struct ModifiedMaStop *)R_ExternalPtrAddr(e); + wickra_modified_ma_stop_reset(h); + return R_NilValue; +} + +static void mom_fin(SEXP e) { + struct Mom *h = (struct Mom *)R_ExternalPtrAddr(e); + if (h) wickra_mom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_mom_new(SEXP a0) { + struct Mom *h = wickra_mom_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Mom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, mom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_mom_update(SEXP e, SEXP a0) { + struct Mom *h = (struct Mom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_mom_update(h, Rf_asReal(a0))); +} +SEXP wk_mom_batch(SEXP e, SEXP a0) { + struct Mom *h = (struct Mom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_mom_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_mom_reset(SEXP e) { + struct Mom *h = (struct Mom *)R_ExternalPtrAddr(e); + wickra_mom_reset(h); + return R_NilValue; +} + +static void morning_doji_star_fin(SEXP e) { + struct MorningDojiStar *h = (struct MorningDojiStar *)R_ExternalPtrAddr(e); + if (h) wickra_morning_doji_star_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_morning_doji_star_new(void) { + struct MorningDojiStar *h = wickra_morning_doji_star_new(); + if (!h) Rf_error("invalid MorningDojiStar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, morning_doji_star_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_morning_doji_star_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MorningDojiStar *h = (struct MorningDojiStar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_morning_doji_star_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_morning_doji_star_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MorningDojiStar *h = (struct MorningDojiStar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_morning_doji_star_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_morning_doji_star_reset(SEXP e) { + struct MorningDojiStar *h = (struct MorningDojiStar *)R_ExternalPtrAddr(e); + wickra_morning_doji_star_reset(h); + return R_NilValue; +} + +static void morning_evening_star_fin(SEXP e) { + struct MorningEveningStar *h = (struct MorningEveningStar *)R_ExternalPtrAddr(e); + if (h) wickra_morning_evening_star_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_morning_evening_star_new(void) { + struct MorningEveningStar *h = wickra_morning_evening_star_new(); + if (!h) Rf_error("invalid MorningEveningStar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, morning_evening_star_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_morning_evening_star_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MorningEveningStar *h = (struct MorningEveningStar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_morning_evening_star_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_morning_evening_star_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MorningEveningStar *h = (struct MorningEveningStar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_morning_evening_star_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_morning_evening_star_reset(SEXP e) { + struct MorningEveningStar *h = (struct MorningEveningStar *)R_ExternalPtrAddr(e); + wickra_morning_evening_star_reset(h); + return R_NilValue; +} + +static void murrey_math_lines_fin(SEXP e) { + struct MurreyMathLines *h = (struct MurreyMathLines *)R_ExternalPtrAddr(e); + if (h) wickra_murrey_math_lines_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_murrey_math_lines_new(SEXP a0) { + struct MurreyMathLines *h = wickra_murrey_math_lines_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid MurreyMathLines parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, murrey_math_lines_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_murrey_math_lines_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct MurreyMathLines *h = (struct MurreyMathLines *)R_ExternalPtrAddr(e); + struct WickraMurreyMathLinesOutput out; + int ok = wickra_murrey_math_lines_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 9)); + REAL(r)[0] = ok ? (double)out.mm8_8 : NA_REAL; + REAL(r)[1] = ok ? (double)out.mm7_8 : NA_REAL; + REAL(r)[2] = ok ? (double)out.mm6_8 : NA_REAL; + REAL(r)[3] = ok ? (double)out.mm5_8 : NA_REAL; + REAL(r)[4] = ok ? (double)out.mm4_8 : NA_REAL; + REAL(r)[5] = ok ? (double)out.mm3_8 : NA_REAL; + REAL(r)[6] = ok ? (double)out.mm2_8 : NA_REAL; + REAL(r)[7] = ok ? (double)out.mm1_8 : NA_REAL; + REAL(r)[8] = ok ? (double)out.mm0_8 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 9)); + SET_STRING_ELT(nm, 0, Rf_mkChar("mm8_8")); + SET_STRING_ELT(nm, 1, Rf_mkChar("mm7_8")); + SET_STRING_ELT(nm, 2, Rf_mkChar("mm6_8")); + SET_STRING_ELT(nm, 3, Rf_mkChar("mm5_8")); + SET_STRING_ELT(nm, 4, Rf_mkChar("mm4_8")); + SET_STRING_ELT(nm, 5, Rf_mkChar("mm3_8")); + SET_STRING_ELT(nm, 6, Rf_mkChar("mm2_8")); + SET_STRING_ELT(nm, 7, Rf_mkChar("mm1_8")); + SET_STRING_ELT(nm, 8, Rf_mkChar("mm0_8")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_murrey_math_lines_reset(SEXP e) { + struct MurreyMathLines *h = (struct MurreyMathLines *)R_ExternalPtrAddr(e); + wickra_murrey_math_lines_reset(h); + return R_NilValue; +} + +static void naked_poc_fin(SEXP e) { + struct NakedPoc *h = (struct NakedPoc *)R_ExternalPtrAddr(e); + if (h) wickra_naked_poc_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_naked_poc_new(SEXP a0, SEXP a1) { + struct NakedPoc *h = wickra_naked_poc_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid NakedPoc parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, naked_poc_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_naked_poc_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct NakedPoc *h = (struct NakedPoc *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_naked_poc_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_naked_poc_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct NakedPoc *h = (struct NakedPoc *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_naked_poc_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_naked_poc_reset(SEXP e) { + struct NakedPoc *h = (struct NakedPoc *)R_ExternalPtrAddr(e); + wickra_naked_poc_reset(h); + return R_NilValue; +} + +static void natr_fin(SEXP e) { + struct Natr *h = (struct Natr *)R_ExternalPtrAddr(e); + if (h) wickra_natr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_natr_new(SEXP a0) { + struct Natr *h = wickra_natr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Natr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, natr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_natr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Natr *h = (struct Natr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_natr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_natr_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Natr *h = (struct Natr *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_natr_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_natr_reset(SEXP e) { + struct Natr *h = (struct Natr *)R_ExternalPtrAddr(e); + wickra_natr_reset(h); + return R_NilValue; +} + +static void new_highs_new_lows_fin(SEXP e) { + struct NewHighsNewLows *h = (struct NewHighsNewLows *)R_ExternalPtrAddr(e); + if (h) wickra_new_highs_new_lows_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_new_highs_new_lows_new(void) { + struct NewHighsNewLows *h = wickra_new_highs_new_lows_new(); + if (!h) Rf_error("invalid NewHighsNewLows parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, new_highs_new_lows_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_new_highs_new_lows_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct NewHighsNewLows *h = (struct NewHighsNewLows *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_new_highs_new_lows_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_new_highs_new_lows_reset(SEXP e) { + struct NewHighsNewLows *h = (struct NewHighsNewLows *)R_ExternalPtrAddr(e); + wickra_new_highs_new_lows_reset(h); + return R_NilValue; +} + +static void new_price_lines_fin(SEXP e) { + struct NewPriceLines *h = (struct NewPriceLines *)R_ExternalPtrAddr(e); + if (h) wickra_new_price_lines_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_new_price_lines_new(SEXP a0) { + struct NewPriceLines *h = wickra_new_price_lines_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid NewPriceLines parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, new_price_lines_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_new_price_lines_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct NewPriceLines *h = (struct NewPriceLines *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_new_price_lines_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_new_price_lines_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct NewPriceLines *h = (struct NewPriceLines *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_new_price_lines_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_new_price_lines_reset(SEXP e) { + struct NewPriceLines *h = (struct NewPriceLines *)R_ExternalPtrAddr(e); + wickra_new_price_lines_reset(h); + return R_NilValue; +} + +static void nrtr_fin(SEXP e) { + struct Nrtr *h = (struct Nrtr *)R_ExternalPtrAddr(e); + if (h) wickra_nrtr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_nrtr_new(SEXP a0) { + struct Nrtr *h = wickra_nrtr_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid Nrtr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, nrtr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_nrtr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Nrtr *h = (struct Nrtr *)R_ExternalPtrAddr(e); + struct WickraNrtrOutput out; + int ok = wickra_nrtr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_nrtr_reset(SEXP e) { + struct Nrtr *h = (struct Nrtr *)R_ExternalPtrAddr(e); + wickra_nrtr_reset(h); + return R_NilValue; +} + +static void nvi_fin(SEXP e) { + struct Nvi *h = (struct Nvi *)R_ExternalPtrAddr(e); + if (h) wickra_nvi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_nvi_new(void) { + struct Nvi *h = wickra_nvi_new(); + if (!h) Rf_error("invalid Nvi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, nvi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_nvi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Nvi *h = (struct Nvi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_nvi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_nvi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Nvi *h = (struct Nvi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_nvi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_nvi_reset(SEXP e) { + struct Nvi *h = (struct Nvi *)R_ExternalPtrAddr(e); + wickra_nvi_reset(h); + return R_NilValue; +} + +static void obv_fin(SEXP e) { + struct Obv *h = (struct Obv *)R_ExternalPtrAddr(e); + if (h) wickra_obv_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_obv_new(void) { + struct Obv *h = wickra_obv_new(); + if (!h) Rf_error("invalid Obv parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, obv_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_obv_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Obv *h = (struct Obv *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_obv_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_obv_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Obv *h = (struct Obv *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_obv_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_obv_reset(SEXP e) { + struct Obv *h = (struct Obv *)R_ExternalPtrAddr(e); + wickra_obv_reset(h); + return R_NilValue; +} + +static void oi_price_divergence_fin(SEXP e) { + struct OIPriceDivergence *h = (struct OIPriceDivergence *)R_ExternalPtrAddr(e); + if (h) wickra_oi_price_divergence_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_oi_price_divergence_new(SEXP a0) { + struct OIPriceDivergence *h = wickra_oi_price_divergence_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OIPriceDivergence parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, oi_price_divergence_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_oi_price_divergence_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct OIPriceDivergence *h = (struct OIPriceDivergence *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_oi_price_divergence_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_oi_price_divergence_reset(SEXP e) { + struct OIPriceDivergence *h = (struct OIPriceDivergence *)R_ExternalPtrAddr(e); + wickra_oi_price_divergence_reset(h); + return R_NilValue; +} + +static void oi_to_volume_ratio_fin(SEXP e) { + struct OiToVolumeRatio *h = (struct OiToVolumeRatio *)R_ExternalPtrAddr(e); + if (h) wickra_oi_to_volume_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_oi_to_volume_ratio_new(void) { + struct OiToVolumeRatio *h = wickra_oi_to_volume_ratio_new(); + if (!h) Rf_error("invalid OiToVolumeRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, oi_to_volume_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_oi_to_volume_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct OiToVolumeRatio *h = (struct OiToVolumeRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_oi_to_volume_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_oi_to_volume_ratio_reset(SEXP e) { + struct OiToVolumeRatio *h = (struct OiToVolumeRatio *)R_ExternalPtrAddr(e); + wickra_oi_to_volume_ratio_reset(h); + return R_NilValue; +} + +static void oi_weighted_fin(SEXP e) { + struct OIWeighted *h = (struct OIWeighted *)R_ExternalPtrAddr(e); + if (h) wickra_oi_weighted_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_oi_weighted_new(void) { + struct OIWeighted *h = wickra_oi_weighted_new(); + if (!h) Rf_error("invalid OIWeighted parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, oi_weighted_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_oi_weighted_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct OIWeighted *h = (struct OIWeighted *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_oi_weighted_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_oi_weighted_reset(SEXP e) { + struct OIWeighted *h = (struct OIWeighted *)R_ExternalPtrAddr(e); + wickra_oi_weighted_reset(h); + return R_NilValue; +} + +static void omega_ratio_fin(SEXP e) { + struct OmegaRatio *h = (struct OmegaRatio *)R_ExternalPtrAddr(e); + if (h) wickra_omega_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_omega_ratio_new(SEXP a0, SEXP a1) { + struct OmegaRatio *h = wickra_omega_ratio_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid OmegaRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, omega_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_omega_ratio_update(SEXP e, SEXP a0) { + struct OmegaRatio *h = (struct OmegaRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_omega_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_omega_ratio_batch(SEXP e, SEXP a0) { + struct OmegaRatio *h = (struct OmegaRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_omega_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_omega_ratio_reset(SEXP e) { + struct OmegaRatio *h = (struct OmegaRatio *)R_ExternalPtrAddr(e); + wickra_omega_ratio_reset(h); + return R_NilValue; +} + +static void on_neck_fin(SEXP e) { + struct OnNeck *h = (struct OnNeck *)R_ExternalPtrAddr(e); + if (h) wickra_on_neck_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_on_neck_new(void) { + struct OnNeck *h = wickra_on_neck_new(); + if (!h) Rf_error("invalid OnNeck parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, on_neck_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_on_neck_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OnNeck *h = (struct OnNeck *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_on_neck_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_on_neck_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OnNeck *h = (struct OnNeck *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_on_neck_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_on_neck_reset(SEXP e) { + struct OnNeck *h = (struct OnNeck *)R_ExternalPtrAddr(e); + wickra_on_neck_reset(h); + return R_NilValue; +} + +static void open_interest_delta_fin(SEXP e) { + struct OpenInterestDelta *h = (struct OpenInterestDelta *)R_ExternalPtrAddr(e); + if (h) wickra_open_interest_delta_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_open_interest_delta_new(void) { + struct OpenInterestDelta *h = wickra_open_interest_delta_new(); + if (!h) Rf_error("invalid OpenInterestDelta parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, open_interest_delta_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_open_interest_delta_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct OpenInterestDelta *h = (struct OpenInterestDelta *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_open_interest_delta_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_open_interest_delta_reset(SEXP e) { + struct OpenInterestDelta *h = (struct OpenInterestDelta *)R_ExternalPtrAddr(e); + wickra_open_interest_delta_reset(h); + return R_NilValue; +} + +static void open_interest_momentum_fin(SEXP e) { + struct OpenInterestMomentum *h = (struct OpenInterestMomentum *)R_ExternalPtrAddr(e); + if (h) wickra_open_interest_momentum_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_open_interest_momentum_new(SEXP a0) { + struct OpenInterestMomentum *h = wickra_open_interest_momentum_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OpenInterestMomentum parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, open_interest_momentum_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_open_interest_momentum_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct OpenInterestMomentum *h = (struct OpenInterestMomentum *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_open_interest_momentum_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_open_interest_momentum_reset(SEXP e) { + struct OpenInterestMomentum *h = (struct OpenInterestMomentum *)R_ExternalPtrAddr(e); + wickra_open_interest_momentum_reset(h); + return R_NilValue; +} + +static void opening_marubozu_fin(SEXP e) { + struct OpeningMarubozu *h = (struct OpeningMarubozu *)R_ExternalPtrAddr(e); + if (h) wickra_opening_marubozu_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_opening_marubozu_new(void) { + struct OpeningMarubozu *h = wickra_opening_marubozu_new(); + if (!h) Rf_error("invalid OpeningMarubozu parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, opening_marubozu_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_opening_marubozu_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OpeningMarubozu *h = (struct OpeningMarubozu *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_opening_marubozu_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_opening_marubozu_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OpeningMarubozu *h = (struct OpeningMarubozu *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_opening_marubozu_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_opening_marubozu_reset(SEXP e) { + struct OpeningMarubozu *h = (struct OpeningMarubozu *)R_ExternalPtrAddr(e); + wickra_opening_marubozu_reset(h); + return R_NilValue; +} + +static void opening_range_fin(SEXP e) { + struct OpeningRange *h = (struct OpeningRange *)R_ExternalPtrAddr(e); + if (h) wickra_opening_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_opening_range_new(SEXP a0) { + struct OpeningRange *h = wickra_opening_range_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OpeningRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, opening_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_opening_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OpeningRange *h = (struct OpeningRange *)R_ExternalPtrAddr(e); + struct WickraOpeningRangeOutput out; + int ok = wickra_opening_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.high : NA_REAL; + REAL(r)[1] = ok ? (double)out.low : NA_REAL; + REAL(r)[2] = ok ? (double)out.breakout_distance : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("high")); + SET_STRING_ELT(nm, 1, Rf_mkChar("low")); + SET_STRING_ELT(nm, 2, Rf_mkChar("breakout_distance")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_opening_range_reset(SEXP e) { + struct OpeningRange *h = (struct OpeningRange *)R_ExternalPtrAddr(e); + wickra_opening_range_reset(h); + return R_NilValue; +} + +static void order_book_imbalance_full_fin(SEXP e) { + struct OrderBookImbalanceFull *h = (struct OrderBookImbalanceFull *)R_ExternalPtrAddr(e); + if (h) wickra_order_book_imbalance_full_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_order_book_imbalance_full_new(void) { + struct OrderBookImbalanceFull *h = wickra_order_book_imbalance_full_new(); + if (!h) Rf_error("invalid OrderBookImbalanceFull parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, order_book_imbalance_full_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_order_book_imbalance_full_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct OrderBookImbalanceFull *h = (struct OrderBookImbalanceFull *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_order_book_imbalance_full_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_order_book_imbalance_full_reset(SEXP e) { + struct OrderBookImbalanceFull *h = (struct OrderBookImbalanceFull *)R_ExternalPtrAddr(e); + wickra_order_book_imbalance_full_reset(h); + return R_NilValue; +} + +static void order_book_imbalance_top1_fin(SEXP e) { + struct OrderBookImbalanceTop1 *h = (struct OrderBookImbalanceTop1 *)R_ExternalPtrAddr(e); + if (h) wickra_order_book_imbalance_top1_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_order_book_imbalance_top1_new(void) { + struct OrderBookImbalanceTop1 *h = wickra_order_book_imbalance_top1_new(); + if (!h) Rf_error("invalid OrderBookImbalanceTop1 parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, order_book_imbalance_top1_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_order_book_imbalance_top1_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct OrderBookImbalanceTop1 *h = (struct OrderBookImbalanceTop1 *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_order_book_imbalance_top1_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_order_book_imbalance_top1_reset(SEXP e) { + struct OrderBookImbalanceTop1 *h = (struct OrderBookImbalanceTop1 *)R_ExternalPtrAddr(e); + wickra_order_book_imbalance_top1_reset(h); + return R_NilValue; +} + +static void order_book_imbalance_top_n_fin(SEXP e) { + struct OrderBookImbalanceTopN *h = (struct OrderBookImbalanceTopN *)R_ExternalPtrAddr(e); + if (h) wickra_order_book_imbalance_top_n_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_order_book_imbalance_top_n_new(SEXP a0) { + struct OrderBookImbalanceTopN *h = wickra_order_book_imbalance_top_n_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OrderBookImbalanceTopN parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, order_book_imbalance_top_n_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_order_book_imbalance_top_n_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct OrderBookImbalanceTopN *h = (struct OrderBookImbalanceTopN *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_order_book_imbalance_top_n_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_order_book_imbalance_top_n_reset(SEXP e) { + struct OrderBookImbalanceTopN *h = (struct OrderBookImbalanceTopN *)R_ExternalPtrAddr(e); + wickra_order_book_imbalance_top_n_reset(h); + return R_NilValue; +} + +static void order_flow_imbalance_fin(SEXP e) { + struct OrderFlowImbalance *h = (struct OrderFlowImbalance *)R_ExternalPtrAddr(e); + if (h) wickra_order_flow_imbalance_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_order_flow_imbalance_new(SEXP a0) { + struct OrderFlowImbalance *h = wickra_order_flow_imbalance_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OrderFlowImbalance parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, order_flow_imbalance_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_order_flow_imbalance_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct OrderFlowImbalance *h = (struct OrderFlowImbalance *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_order_flow_imbalance_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_order_flow_imbalance_reset(SEXP e) { + struct OrderFlowImbalance *h = (struct OrderFlowImbalance *)R_ExternalPtrAddr(e); + wickra_order_flow_imbalance_reset(h); + return R_NilValue; +} + +static void ou_half_life_fin(SEXP e) { + struct OuHalfLife *h = (struct OuHalfLife *)R_ExternalPtrAddr(e); + if (h) wickra_ou_half_life_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ou_half_life_new(SEXP a0) { + struct OuHalfLife *h = wickra_ou_half_life_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid OuHalfLife parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ou_half_life_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ou_half_life_update(SEXP e, SEXP a0, SEXP a1) { + struct OuHalfLife *h = (struct OuHalfLife *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ou_half_life_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_ou_half_life_batch(SEXP e, SEXP a0, SEXP a1) { + struct OuHalfLife *h = (struct OuHalfLife *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ou_half_life_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ou_half_life_reset(SEXP e) { + struct OuHalfLife *h = (struct OuHalfLife *)R_ExternalPtrAddr(e); + wickra_ou_half_life_reset(h); + return R_NilValue; +} + +static void overnight_gap_fin(SEXP e) { + struct OvernightGap *h = (struct OvernightGap *)R_ExternalPtrAddr(e); + if (h) wickra_overnight_gap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_overnight_gap_new(SEXP a0) { + struct OvernightGap *h = wickra_overnight_gap_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid OvernightGap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, overnight_gap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_overnight_gap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OvernightGap *h = (struct OvernightGap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_overnight_gap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_overnight_gap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OvernightGap *h = (struct OvernightGap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_overnight_gap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_overnight_gap_reset(SEXP e) { + struct OvernightGap *h = (struct OvernightGap *)R_ExternalPtrAddr(e); + wickra_overnight_gap_reset(h); + return R_NilValue; +} + +static void overnight_intraday_return_fin(SEXP e) { + struct OvernightIntradayReturn *h = (struct OvernightIntradayReturn *)R_ExternalPtrAddr(e); + if (h) wickra_overnight_intraday_return_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_overnight_intraday_return_new(SEXP a0) { + struct OvernightIntradayReturn *h = wickra_overnight_intraday_return_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid OvernightIntradayReturn parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, overnight_intraday_return_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_overnight_intraday_return_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct OvernightIntradayReturn *h = (struct OvernightIntradayReturn *)R_ExternalPtrAddr(e); + struct WickraOvernightIntradayReturnOutput out; + int ok = wickra_overnight_intraday_return_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.overnight : NA_REAL; + REAL(r)[1] = ok ? (double)out.intraday : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("overnight")); + SET_STRING_ELT(nm, 1, Rf_mkChar("intraday")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_overnight_intraday_return_reset(SEXP e) { + struct OvernightIntradayReturn *h = (struct OvernightIntradayReturn *)R_ExternalPtrAddr(e); + wickra_overnight_intraday_return_reset(h); + return R_NilValue; +} + +static void pain_index_fin(SEXP e) { + struct PainIndex *h = (struct PainIndex *)R_ExternalPtrAddr(e); + if (h) wickra_pain_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pain_index_new(SEXP a0) { + struct PainIndex *h = wickra_pain_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid PainIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pain_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pain_index_update(SEXP e, SEXP a0) { + struct PainIndex *h = (struct PainIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pain_index_update(h, Rf_asReal(a0))); +} +SEXP wk_pain_index_batch(SEXP e, SEXP a0) { + struct PainIndex *h = (struct PainIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_pain_index_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pain_index_reset(SEXP e) { + struct PainIndex *h = (struct PainIndex *)R_ExternalPtrAddr(e); + wickra_pain_index_reset(h); + return R_NilValue; +} + +static void pair_spread_z_score_fin(SEXP e) { + struct PairSpreadZScore *h = (struct PairSpreadZScore *)R_ExternalPtrAddr(e); + if (h) wickra_pair_spread_z_score_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pair_spread_z_score_new(SEXP a0, SEXP a1) { + struct PairSpreadZScore *h = wickra_pair_spread_z_score_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid PairSpreadZScore parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pair_spread_z_score_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pair_spread_z_score_update(SEXP e, SEXP a0, SEXP a1) { + struct PairSpreadZScore *h = (struct PairSpreadZScore *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pair_spread_z_score_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_pair_spread_z_score_batch(SEXP e, SEXP a0, SEXP a1) { + struct PairSpreadZScore *h = (struct PairSpreadZScore *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_pair_spread_z_score_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pair_spread_z_score_reset(SEXP e) { + struct PairSpreadZScore *h = (struct PairSpreadZScore *)R_ExternalPtrAddr(e); + wickra_pair_spread_z_score_reset(h); + return R_NilValue; +} + +static void pairwise_beta_fin(SEXP e) { + struct PairwiseBeta *h = (struct PairwiseBeta *)R_ExternalPtrAddr(e); + if (h) wickra_pairwise_beta_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pairwise_beta_new(SEXP a0) { + struct PairwiseBeta *h = wickra_pairwise_beta_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid PairwiseBeta parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pairwise_beta_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pairwise_beta_update(SEXP e, SEXP a0, SEXP a1) { + struct PairwiseBeta *h = (struct PairwiseBeta *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pairwise_beta_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_pairwise_beta_batch(SEXP e, SEXP a0, SEXP a1) { + struct PairwiseBeta *h = (struct PairwiseBeta *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_pairwise_beta_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pairwise_beta_reset(SEXP e) { + struct PairwiseBeta *h = (struct PairwiseBeta *)R_ExternalPtrAddr(e); + wickra_pairwise_beta_reset(h); + return R_NilValue; +} + +static void parkinson_volatility_fin(SEXP e) { + struct ParkinsonVolatility *h = (struct ParkinsonVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_parkinson_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_parkinson_volatility_new(SEXP a0, SEXP a1) { + struct ParkinsonVolatility *h = wickra_parkinson_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid ParkinsonVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, parkinson_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_parkinson_volatility_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ParkinsonVolatility *h = (struct ParkinsonVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_parkinson_volatility_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_parkinson_volatility_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ParkinsonVolatility *h = (struct ParkinsonVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_parkinson_volatility_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_parkinson_volatility_reset(SEXP e) { + struct ParkinsonVolatility *h = (struct ParkinsonVolatility *)R_ExternalPtrAddr(e); + wickra_parkinson_volatility_reset(h); + return R_NilValue; +} + +static void pearson_correlation_fin(SEXP e) { + struct PearsonCorrelation *h = (struct PearsonCorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_pearson_correlation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pearson_correlation_new(SEXP a0) { + struct PearsonCorrelation *h = wickra_pearson_correlation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid PearsonCorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pearson_correlation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pearson_correlation_update(SEXP e, SEXP a0, SEXP a1) { + struct PearsonCorrelation *h = (struct PearsonCorrelation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pearson_correlation_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_pearson_correlation_batch(SEXP e, SEXP a0, SEXP a1) { + struct PearsonCorrelation *h = (struct PearsonCorrelation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_pearson_correlation_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pearson_correlation_reset(SEXP e) { + struct PearsonCorrelation *h = (struct PearsonCorrelation *)R_ExternalPtrAddr(e); + wickra_pearson_correlation_reset(h); + return R_NilValue; +} + +static void percent_above_ma_fin(SEXP e) { + struct PercentAboveMa *h = (struct PercentAboveMa *)R_ExternalPtrAddr(e); + if (h) wickra_percent_above_ma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_percent_above_ma_new(void) { + struct PercentAboveMa *h = wickra_percent_above_ma_new(); + if (!h) Rf_error("invalid PercentAboveMa parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, percent_above_ma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_percent_above_ma_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct PercentAboveMa *h = (struct PercentAboveMa *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_percent_above_ma_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_percent_above_ma_reset(SEXP e) { + struct PercentAboveMa *h = (struct PercentAboveMa *)R_ExternalPtrAddr(e); + wickra_percent_above_ma_reset(h); + return R_NilValue; +} + +static void percent_b_fin(SEXP e) { + struct PercentB *h = (struct PercentB *)R_ExternalPtrAddr(e); + if (h) wickra_percent_b_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_percent_b_new(SEXP a0, SEXP a1) { + struct PercentB *h = wickra_percent_b_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid PercentB parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, percent_b_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_percent_b_update(SEXP e, SEXP a0) { + struct PercentB *h = (struct PercentB *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_percent_b_update(h, Rf_asReal(a0))); +} +SEXP wk_percent_b_batch(SEXP e, SEXP a0) { + struct PercentB *h = (struct PercentB *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_percent_b_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_percent_b_reset(SEXP e) { + struct PercentB *h = (struct PercentB *)R_ExternalPtrAddr(e); + wickra_percent_b_reset(h); + return R_NilValue; +} + +static void percentage_trailing_stop_fin(SEXP e) { + struct PercentageTrailingStop *h = (struct PercentageTrailingStop *)R_ExternalPtrAddr(e); + if (h) wickra_percentage_trailing_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_percentage_trailing_stop_new(SEXP a0) { + struct PercentageTrailingStop *h = wickra_percentage_trailing_stop_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid PercentageTrailingStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, percentage_trailing_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_percentage_trailing_stop_update(SEXP e, SEXP a0) { + struct PercentageTrailingStop *h = (struct PercentageTrailingStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_percentage_trailing_stop_update(h, Rf_asReal(a0))); +} +SEXP wk_percentage_trailing_stop_batch(SEXP e, SEXP a0) { + struct PercentageTrailingStop *h = (struct PercentageTrailingStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_percentage_trailing_stop_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_percentage_trailing_stop_reset(SEXP e) { + struct PercentageTrailingStop *h = (struct PercentageTrailingStop *)R_ExternalPtrAddr(e); + wickra_percentage_trailing_stop_reset(h); + return R_NilValue; +} + +static void perpetual_premium_index_fin(SEXP e) { + struct PerpetualPremiumIndex *h = (struct PerpetualPremiumIndex *)R_ExternalPtrAddr(e); + if (h) wickra_perpetual_premium_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_perpetual_premium_index_new(void) { + struct PerpetualPremiumIndex *h = wickra_perpetual_premium_index_new(); + if (!h) Rf_error("invalid PerpetualPremiumIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, perpetual_premium_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_perpetual_premium_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct PerpetualPremiumIndex *h = (struct PerpetualPremiumIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_perpetual_premium_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_perpetual_premium_index_reset(SEXP e) { + struct PerpetualPremiumIndex *h = (struct PerpetualPremiumIndex *)R_ExternalPtrAddr(e); + wickra_perpetual_premium_index_reset(h); + return R_NilValue; +} + +static void pgo_fin(SEXP e) { + struct Pgo *h = (struct Pgo *)R_ExternalPtrAddr(e); + if (h) wickra_pgo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pgo_new(SEXP a0) { + struct Pgo *h = wickra_pgo_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Pgo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pgo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pgo_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Pgo *h = (struct Pgo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pgo_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_pgo_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Pgo *h = (struct Pgo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_pgo_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pgo_reset(SEXP e) { + struct Pgo *h = (struct Pgo *)R_ExternalPtrAddr(e); + wickra_pgo_reset(h); + return R_NilValue; +} + +static void piercing_dark_cloud_fin(SEXP e) { + struct PiercingDarkCloud *h = (struct PiercingDarkCloud *)R_ExternalPtrAddr(e); + if (h) wickra_piercing_dark_cloud_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_piercing_dark_cloud_new(void) { + struct PiercingDarkCloud *h = wickra_piercing_dark_cloud_new(); + if (!h) Rf_error("invalid PiercingDarkCloud parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, piercing_dark_cloud_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_piercing_dark_cloud_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PiercingDarkCloud *h = (struct PiercingDarkCloud *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_piercing_dark_cloud_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_piercing_dark_cloud_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PiercingDarkCloud *h = (struct PiercingDarkCloud *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_piercing_dark_cloud_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_piercing_dark_cloud_reset(SEXP e) { + struct PiercingDarkCloud *h = (struct PiercingDarkCloud *)R_ExternalPtrAddr(e); + wickra_piercing_dark_cloud_reset(h); + return R_NilValue; +} + +static void pin_fin(SEXP e) { + struct Pin *h = (struct Pin *)R_ExternalPtrAddr(e); + if (h) wickra_pin_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pin_new(SEXP a0) { + struct Pin *h = wickra_pin_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Pin parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pin_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pin_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Pin *h = (struct Pin *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pin_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_pin_reset(SEXP e) { + struct Pin *h = (struct Pin *)R_ExternalPtrAddr(e); + wickra_pin_reset(h); + return R_NilValue; +} + +static void pivot_reversal_fin(SEXP e) { + struct PivotReversal *h = (struct PivotReversal *)R_ExternalPtrAddr(e); + if (h) wickra_pivot_reversal_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pivot_reversal_new(SEXP a0, SEXP a1) { + struct PivotReversal *h = wickra_pivot_reversal_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid PivotReversal parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pivot_reversal_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pivot_reversal_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PivotReversal *h = (struct PivotReversal *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pivot_reversal_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_pivot_reversal_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PivotReversal *h = (struct PivotReversal *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_pivot_reversal_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pivot_reversal_reset(SEXP e) { + struct PivotReversal *h = (struct PivotReversal *)R_ExternalPtrAddr(e); + wickra_pivot_reversal_reset(h); + return R_NilValue; +} + +static void plus_di_fin(SEXP e) { + struct PlusDi *h = (struct PlusDi *)R_ExternalPtrAddr(e); + if (h) wickra_plus_di_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_plus_di_new(SEXP a0) { + struct PlusDi *h = wickra_plus_di_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid PlusDi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, plus_di_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_plus_di_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PlusDi *h = (struct PlusDi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_plus_di_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_plus_di_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PlusDi *h = (struct PlusDi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_plus_di_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_plus_di_reset(SEXP e) { + struct PlusDi *h = (struct PlusDi *)R_ExternalPtrAddr(e); + wickra_plus_di_reset(h); + return R_NilValue; +} + +static void plus_dm_fin(SEXP e) { + struct PlusDm *h = (struct PlusDm *)R_ExternalPtrAddr(e); + if (h) wickra_plus_dm_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_plus_dm_new(SEXP a0) { + struct PlusDm *h = wickra_plus_dm_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid PlusDm parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, plus_dm_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_plus_dm_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PlusDm *h = (struct PlusDm *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_plus_dm_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_plus_dm_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PlusDm *h = (struct PlusDm *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_plus_dm_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_plus_dm_reset(SEXP e) { + struct PlusDm *h = (struct PlusDm *)R_ExternalPtrAddr(e); + wickra_plus_dm_reset(h); + return R_NilValue; +} + +static void pmo_fin(SEXP e) { + struct Pmo *h = (struct Pmo *)R_ExternalPtrAddr(e); + if (h) wickra_pmo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pmo_new(SEXP a0, SEXP a1) { + struct Pmo *h = wickra_pmo_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Pmo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pmo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pmo_update(SEXP e, SEXP a0) { + struct Pmo *h = (struct Pmo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pmo_update(h, Rf_asReal(a0))); +} +SEXP wk_pmo_batch(SEXP e, SEXP a0) { + struct Pmo *h = (struct Pmo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_pmo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pmo_reset(SEXP e) { + struct Pmo *h = (struct Pmo *)R_ExternalPtrAddr(e); + wickra_pmo_reset(h); + return R_NilValue; +} + +static void point_and_figure_bars_fin(SEXP e) { + struct PointAndFigureBars *h = (struct PointAndFigureBars *)R_ExternalPtrAddr(e); + if (h) wickra_point_and_figure_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_point_and_figure_bars_new(SEXP a0, SEXP a1) { + struct PointAndFigureBars *h = wickra_point_and_figure_bars_new(Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid PointAndFigureBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, point_and_figure_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_point_and_figure_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct PointAndFigureBars *h = (struct PointAndFigureBars *)R_ExternalPtrAddr(e); + struct WickraPnfColumn buf[64]; + size_t n = wickra_point_and_figure_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].direction; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("direction")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_point_and_figure_bars_reset(SEXP e) { + struct PointAndFigureBars *h = (struct PointAndFigureBars *)R_ExternalPtrAddr(e); + wickra_point_and_figure_bars_reset(h); + return R_NilValue; +} + +static void polarized_fractal_efficiency_fin(SEXP e) { + struct PolarizedFractalEfficiency *h = (struct PolarizedFractalEfficiency *)R_ExternalPtrAddr(e); + if (h) wickra_polarized_fractal_efficiency_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_polarized_fractal_efficiency_new(SEXP a0, SEXP a1) { + struct PolarizedFractalEfficiency *h = wickra_polarized_fractal_efficiency_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid PolarizedFractalEfficiency parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, polarized_fractal_efficiency_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_polarized_fractal_efficiency_update(SEXP e, SEXP a0) { + struct PolarizedFractalEfficiency *h = (struct PolarizedFractalEfficiency *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_polarized_fractal_efficiency_update(h, Rf_asReal(a0))); +} +SEXP wk_polarized_fractal_efficiency_batch(SEXP e, SEXP a0) { + struct PolarizedFractalEfficiency *h = (struct PolarizedFractalEfficiency *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_polarized_fractal_efficiency_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_polarized_fractal_efficiency_reset(SEXP e) { + struct PolarizedFractalEfficiency *h = (struct PolarizedFractalEfficiency *)R_ExternalPtrAddr(e); + wickra_polarized_fractal_efficiency_reset(h); + return R_NilValue; +} + +static void ppo_fin(SEXP e) { + struct Ppo *h = (struct Ppo *)R_ExternalPtrAddr(e); + if (h) wickra_ppo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ppo_new(SEXP a0, SEXP a1) { + struct Ppo *h = wickra_ppo_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Ppo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ppo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ppo_update(SEXP e, SEXP a0) { + struct Ppo *h = (struct Ppo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ppo_update(h, Rf_asReal(a0))); +} +SEXP wk_ppo_batch(SEXP e, SEXP a0) { + struct Ppo *h = (struct Ppo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ppo_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ppo_reset(SEXP e) { + struct Ppo *h = (struct Ppo *)R_ExternalPtrAddr(e); + wickra_ppo_reset(h); + return R_NilValue; +} + +static void ppo_histogram_fin(SEXP e) { + struct PpoHistogram *h = (struct PpoHistogram *)R_ExternalPtrAddr(e); + if (h) wickra_ppo_histogram_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ppo_histogram_new(SEXP a0, SEXP a1, SEXP a2) { + struct PpoHistogram *h = wickra_ppo_histogram_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid PpoHistogram parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ppo_histogram_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ppo_histogram_update(SEXP e, SEXP a0) { + struct PpoHistogram *h = (struct PpoHistogram *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ppo_histogram_update(h, Rf_asReal(a0))); +} +SEXP wk_ppo_histogram_batch(SEXP e, SEXP a0) { + struct PpoHistogram *h = (struct PpoHistogram *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ppo_histogram_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ppo_histogram_reset(SEXP e) { + struct PpoHistogram *h = (struct PpoHistogram *)R_ExternalPtrAddr(e); + wickra_ppo_histogram_reset(h); + return R_NilValue; +} + +static void profile_shape_fin(SEXP e) { + struct ProfileShape *h = (struct ProfileShape *)R_ExternalPtrAddr(e); + if (h) wickra_profile_shape_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_profile_shape_new(SEXP a0, SEXP a1) { + struct ProfileShape *h = wickra_profile_shape_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid ProfileShape parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, profile_shape_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_profile_shape_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ProfileShape *h = (struct ProfileShape *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_profile_shape_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_profile_shape_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ProfileShape *h = (struct ProfileShape *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_profile_shape_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_profile_shape_reset(SEXP e) { + struct ProfileShape *h = (struct ProfileShape *)R_ExternalPtrAddr(e); + wickra_profile_shape_reset(h); + return R_NilValue; +} + +static void profit_factor_fin(SEXP e) { + struct ProfitFactor *h = (struct ProfitFactor *)R_ExternalPtrAddr(e); + if (h) wickra_profit_factor_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_profit_factor_new(SEXP a0) { + struct ProfitFactor *h = wickra_profit_factor_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ProfitFactor parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, profit_factor_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_profit_factor_update(SEXP e, SEXP a0) { + struct ProfitFactor *h = (struct ProfitFactor *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_profit_factor_update(h, Rf_asReal(a0))); +} +SEXP wk_profit_factor_batch(SEXP e, SEXP a0) { + struct ProfitFactor *h = (struct ProfitFactor *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_profit_factor_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_profit_factor_reset(SEXP e) { + struct ProfitFactor *h = (struct ProfitFactor *)R_ExternalPtrAddr(e); + wickra_profit_factor_reset(h); + return R_NilValue; +} + +static void projection_bands_fin(SEXP e) { + struct ProjectionBands *h = (struct ProjectionBands *)R_ExternalPtrAddr(e); + if (h) wickra_projection_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_projection_bands_new(SEXP a0) { + struct ProjectionBands *h = wickra_projection_bands_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ProjectionBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, projection_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_projection_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ProjectionBands *h = (struct ProjectionBands *)R_ExternalPtrAddr(e); + struct WickraProjectionBandsOutput out; + int ok = wickra_projection_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_projection_bands_reset(SEXP e) { + struct ProjectionBands *h = (struct ProjectionBands *)R_ExternalPtrAddr(e); + wickra_projection_bands_reset(h); + return R_NilValue; +} + +static void projection_oscillator_fin(SEXP e) { + struct ProjectionOscillator *h = (struct ProjectionOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_projection_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_projection_oscillator_new(SEXP a0) { + struct ProjectionOscillator *h = wickra_projection_oscillator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ProjectionOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, projection_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_projection_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ProjectionOscillator *h = (struct ProjectionOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_projection_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_projection_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ProjectionOscillator *h = (struct ProjectionOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_projection_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_projection_oscillator_reset(SEXP e) { + struct ProjectionOscillator *h = (struct ProjectionOscillator *)R_ExternalPtrAddr(e); + wickra_projection_oscillator_reset(h); + return R_NilValue; +} + +static void psar_fin(SEXP e) { + struct Psar *h = (struct Psar *)R_ExternalPtrAddr(e); + if (h) wickra_psar_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_psar_new(SEXP a0, SEXP a1, SEXP a2) { + struct Psar *h = wickra_psar_new(Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid Psar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, psar_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_psar_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Psar *h = (struct Psar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_psar_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_psar_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Psar *h = (struct Psar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_psar_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_psar_reset(SEXP e) { + struct Psar *h = (struct Psar *)R_ExternalPtrAddr(e); + wickra_psar_reset(h); + return R_NilValue; +} + +static void pvi_fin(SEXP e) { + struct Pvi *h = (struct Pvi *)R_ExternalPtrAddr(e); + if (h) wickra_pvi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_pvi_new(void) { + struct Pvi *h = wickra_pvi_new(); + if (!h) Rf_error("invalid Pvi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, pvi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_pvi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Pvi *h = (struct Pvi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_pvi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_pvi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Pvi *h = (struct Pvi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_pvi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_pvi_reset(SEXP e) { + struct Pvi *h = (struct Pvi *)R_ExternalPtrAddr(e); + wickra_pvi_reset(h); + return R_NilValue; +} + +static void qqe_fin(SEXP e) { + struct Qqe *h = (struct Qqe *)R_ExternalPtrAddr(e); + if (h) wickra_qqe_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_qqe_new(SEXP a0, SEXP a1, SEXP a2) { + struct Qqe *h = wickra_qqe_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid Qqe parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, qqe_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_qqe_update(SEXP e, SEXP a0) { + struct Qqe *h = (struct Qqe *)R_ExternalPtrAddr(e); + struct WickraQqeOutput out; + int ok = wickra_qqe_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.rsi_ma : NA_REAL; + REAL(r)[1] = ok ? (double)out.trailing_line : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("rsi_ma")); + SET_STRING_ELT(nm, 1, Rf_mkChar("trailing_line")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_qqe_reset(SEXP e) { + struct Qqe *h = (struct Qqe *)R_ExternalPtrAddr(e); + wickra_qqe_reset(h); + return R_NilValue; +} + +static void qstick_fin(SEXP e) { + struct Qstick *h = (struct Qstick *)R_ExternalPtrAddr(e); + if (h) wickra_qstick_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_qstick_new(SEXP a0) { + struct Qstick *h = wickra_qstick_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Qstick parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, qstick_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_qstick_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Qstick *h = (struct Qstick *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_qstick_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_qstick_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Qstick *h = (struct Qstick *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_qstick_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_qstick_reset(SEXP e) { + struct Qstick *h = (struct Qstick *)R_ExternalPtrAddr(e); + wickra_qstick_reset(h); + return R_NilValue; +} + +static void quartile_bands_fin(SEXP e) { + struct QuartileBands *h = (struct QuartileBands *)R_ExternalPtrAddr(e); + if (h) wickra_quartile_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_quartile_bands_new(SEXP a0) { + struct QuartileBands *h = wickra_quartile_bands_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid QuartileBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, quartile_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_quartile_bands_update(SEXP e, SEXP a0) { + struct QuartileBands *h = (struct QuartileBands *)R_ExternalPtrAddr(e); + struct WickraQuartileBandsOutput out; + int ok = wickra_quartile_bands_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_quartile_bands_reset(SEXP e) { + struct QuartileBands *h = (struct QuartileBands *)R_ExternalPtrAddr(e); + wickra_quartile_bands_reset(h); + return R_NilValue; +} + +static void quoted_spread_fin(SEXP e) { + struct QuotedSpread *h = (struct QuotedSpread *)R_ExternalPtrAddr(e); + if (h) wickra_quoted_spread_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_quoted_spread_new(void) { + struct QuotedSpread *h = wickra_quoted_spread_new(); + if (!h) Rf_error("invalid QuotedSpread parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, quoted_spread_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_quoted_spread_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct QuotedSpread *h = (struct QuotedSpread *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_quoted_spread_update(h, (double *)REAL(a0), (double *)REAL(a1), (uintptr_t)Rf_xlength(a0), (double *)REAL(a2), (double *)REAL(a3), (uintptr_t)Rf_xlength(a2))); +} +SEXP wk_quoted_spread_reset(SEXP e) { + struct QuotedSpread *h = (struct QuotedSpread *)R_ExternalPtrAddr(e); + wickra_quoted_spread_reset(h); + return R_NilValue; +} + +static void r_squared_fin(SEXP e) { + struct RSquared *h = (struct RSquared *)R_ExternalPtrAddr(e); + if (h) wickra_r_squared_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_r_squared_new(SEXP a0) { + struct RSquared *h = wickra_r_squared_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RSquared parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, r_squared_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_r_squared_update(SEXP e, SEXP a0) { + struct RSquared *h = (struct RSquared *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_r_squared_update(h, Rf_asReal(a0))); +} +SEXP wk_r_squared_batch(SEXP e, SEXP a0) { + struct RSquared *h = (struct RSquared *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_r_squared_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_r_squared_reset(SEXP e) { + struct RSquared *h = (struct RSquared *)R_ExternalPtrAddr(e); + wickra_r_squared_reset(h); + return R_NilValue; +} + +static void range_bars_fin(SEXP e) { + struct RangeBars *h = (struct RangeBars *)R_ExternalPtrAddr(e); + if (h) wickra_range_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_range_bars_new(SEXP a0) { + struct RangeBars *h = wickra_range_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid RangeBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, range_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_range_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RangeBars *h = (struct RangeBars *)R_ExternalPtrAddr(e); + struct WickraRangeBar buf[64]; + size_t n = wickra_range_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].close; + REAL(r)[i + n * 2] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("close")); + SET_STRING_ELT(cn, 2, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_range_bars_reset(SEXP e) { + struct RangeBars *h = (struct RangeBars *)R_ExternalPtrAddr(e); + wickra_range_bars_reset(h); + return R_NilValue; +} + +static void realized_spread_fin(SEXP e) { + struct RealizedSpread *h = (struct RealizedSpread *)R_ExternalPtrAddr(e); + if (h) wickra_realized_spread_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_realized_spread_new(SEXP a0) { + struct RealizedSpread *h = wickra_realized_spread_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RealizedSpread parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, realized_spread_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_realized_spread_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4) { + struct RealizedSpread *h = (struct RealizedSpread *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_realized_spread_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3), Rf_asReal(a4))); +} +SEXP wk_realized_spread_reset(SEXP e) { + struct RealizedSpread *h = (struct RealizedSpread *)R_ExternalPtrAddr(e); + wickra_realized_spread_reset(h); + return R_NilValue; +} + +static void realized_volatility_fin(SEXP e) { + struct RealizedVolatility *h = (struct RealizedVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_realized_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_realized_volatility_new(SEXP a0) { + struct RealizedVolatility *h = wickra_realized_volatility_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RealizedVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, realized_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_realized_volatility_update(SEXP e, SEXP a0) { + struct RealizedVolatility *h = (struct RealizedVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_realized_volatility_update(h, Rf_asReal(a0))); +} +SEXP wk_realized_volatility_batch(SEXP e, SEXP a0) { + struct RealizedVolatility *h = (struct RealizedVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_realized_volatility_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_realized_volatility_reset(SEXP e) { + struct RealizedVolatility *h = (struct RealizedVolatility *)R_ExternalPtrAddr(e); + wickra_realized_volatility_reset(h); + return R_NilValue; +} + +static void recovery_factor_fin(SEXP e) { + struct RecoveryFactor *h = (struct RecoveryFactor *)R_ExternalPtrAddr(e); + if (h) wickra_recovery_factor_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_recovery_factor_new(void) { + struct RecoveryFactor *h = wickra_recovery_factor_new(); + if (!h) Rf_error("invalid RecoveryFactor parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, recovery_factor_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_recovery_factor_update(SEXP e, SEXP a0) { + struct RecoveryFactor *h = (struct RecoveryFactor *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_recovery_factor_update(h, Rf_asReal(a0))); +} +SEXP wk_recovery_factor_batch(SEXP e, SEXP a0) { + struct RecoveryFactor *h = (struct RecoveryFactor *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_recovery_factor_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_recovery_factor_reset(SEXP e) { + struct RecoveryFactor *h = (struct RecoveryFactor *)R_ExternalPtrAddr(e); + wickra_recovery_factor_reset(h); + return R_NilValue; +} + +static void rectangle_range_fin(SEXP e) { + struct RectangleRange *h = (struct RectangleRange *)R_ExternalPtrAddr(e); + if (h) wickra_rectangle_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rectangle_range_new(void) { + struct RectangleRange *h = wickra_rectangle_range_new(); + if (!h) Rf_error("invalid RectangleRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rectangle_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rectangle_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RectangleRange *h = (struct RectangleRange *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rectangle_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rectangle_range_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RectangleRange *h = (struct RectangleRange *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rectangle_range_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rectangle_range_reset(SEXP e) { + struct RectangleRange *h = (struct RectangleRange *)R_ExternalPtrAddr(e); + wickra_rectangle_range_reset(h); + return R_NilValue; +} + +static void reflex_fin(SEXP e) { + struct Reflex *h = (struct Reflex *)R_ExternalPtrAddr(e); + if (h) wickra_reflex_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_reflex_new(SEXP a0) { + struct Reflex *h = wickra_reflex_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Reflex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, reflex_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_reflex_update(SEXP e, SEXP a0) { + struct Reflex *h = (struct Reflex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_reflex_update(h, Rf_asReal(a0))); +} +SEXP wk_reflex_batch(SEXP e, SEXP a0) { + struct Reflex *h = (struct Reflex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_reflex_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_reflex_reset(SEXP e) { + struct Reflex *h = (struct Reflex *)R_ExternalPtrAddr(e); + wickra_reflex_reset(h); + return R_NilValue; +} + +static void regime_label_fin(SEXP e) { + struct RegimeLabel *h = (struct RegimeLabel *)R_ExternalPtrAddr(e); + if (h) wickra_regime_label_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_regime_label_new(SEXP a0, SEXP a1) { + struct RegimeLabel *h = wickra_regime_label_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid RegimeLabel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, regime_label_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_regime_label_update(SEXP e, SEXP a0) { + struct RegimeLabel *h = (struct RegimeLabel *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_regime_label_update(h, Rf_asReal(a0))); +} +SEXP wk_regime_label_batch(SEXP e, SEXP a0) { + struct RegimeLabel *h = (struct RegimeLabel *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_regime_label_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_regime_label_reset(SEXP e) { + struct RegimeLabel *h = (struct RegimeLabel *)R_ExternalPtrAddr(e); + wickra_regime_label_reset(h); + return R_NilValue; +} + +static void relative_strength_ab_fin(SEXP e) { + struct RelativeStrengthAB *h = (struct RelativeStrengthAB *)R_ExternalPtrAddr(e); + if (h) wickra_relative_strength_ab_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_relative_strength_ab_new(SEXP a0, SEXP a1) { + struct RelativeStrengthAB *h = wickra_relative_strength_ab_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid RelativeStrengthAB parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, relative_strength_ab_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_relative_strength_ab_update(SEXP e, SEXP a0, SEXP a1) { + struct RelativeStrengthAB *h = (struct RelativeStrengthAB *)R_ExternalPtrAddr(e); + struct WickraRelativeStrengthOutput out; + int ok = wickra_relative_strength_ab_update(h, Rf_asReal(a0), Rf_asReal(a1), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.ratio : NA_REAL; + REAL(r)[1] = ok ? (double)out.ratio_ma : NA_REAL; + REAL(r)[2] = ok ? (double)out.ratio_rsi : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("ratio")); + SET_STRING_ELT(nm, 1, Rf_mkChar("ratio_ma")); + SET_STRING_ELT(nm, 2, Rf_mkChar("ratio_rsi")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_relative_strength_ab_reset(SEXP e) { + struct RelativeStrengthAB *h = (struct RelativeStrengthAB *)R_ExternalPtrAddr(e); + wickra_relative_strength_ab_reset(h); + return R_NilValue; +} + +static void renko_bars_fin(SEXP e) { + struct RenkoBars *h = (struct RenkoBars *)R_ExternalPtrAddr(e); + if (h) wickra_renko_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_renko_bars_new(SEXP a0) { + struct RenkoBars *h = wickra_renko_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid RenkoBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, renko_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_renko_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RenkoBars *h = (struct RenkoBars *)R_ExternalPtrAddr(e); + struct WickraRenkoBrick buf[64]; + size_t n = wickra_renko_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].close; + REAL(r)[i + n * 2] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("close")); + SET_STRING_ELT(cn, 2, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_renko_bars_reset(SEXP e) { + struct RenkoBars *h = (struct RenkoBars *)R_ExternalPtrAddr(e); + wickra_renko_bars_reset(h); + return R_NilValue; +} + +static void renko_trailing_stop_fin(SEXP e) { + struct RenkoTrailingStop *h = (struct RenkoTrailingStop *)R_ExternalPtrAddr(e); + if (h) wickra_renko_trailing_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_renko_trailing_stop_new(SEXP a0) { + struct RenkoTrailingStop *h = wickra_renko_trailing_stop_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid RenkoTrailingStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, renko_trailing_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_renko_trailing_stop_update(SEXP e, SEXP a0) { + struct RenkoTrailingStop *h = (struct RenkoTrailingStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_renko_trailing_stop_update(h, Rf_asReal(a0))); +} +SEXP wk_renko_trailing_stop_batch(SEXP e, SEXP a0) { + struct RenkoTrailingStop *h = (struct RenkoTrailingStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_renko_trailing_stop_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_renko_trailing_stop_reset(SEXP e) { + struct RenkoTrailingStop *h = (struct RenkoTrailingStop *)R_ExternalPtrAddr(e); + wickra_renko_trailing_stop_reset(h); + return R_NilValue; +} + +static void rickshaw_man_fin(SEXP e) { + struct RickshawMan *h = (struct RickshawMan *)R_ExternalPtrAddr(e); + if (h) wickra_rickshaw_man_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rickshaw_man_new(void) { + struct RickshawMan *h = wickra_rickshaw_man_new(); + if (!h) Rf_error("invalid RickshawMan parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rickshaw_man_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rickshaw_man_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RickshawMan *h = (struct RickshawMan *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rickshaw_man_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rickshaw_man_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RickshawMan *h = (struct RickshawMan *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rickshaw_man_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rickshaw_man_reset(SEXP e) { + struct RickshawMan *h = (struct RickshawMan *)R_ExternalPtrAddr(e); + wickra_rickshaw_man_reset(h); + return R_NilValue; +} + +static void rising_three_methods_fin(SEXP e) { + struct RisingThreeMethods *h = (struct RisingThreeMethods *)R_ExternalPtrAddr(e); + if (h) wickra_rising_three_methods_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rising_three_methods_new(void) { + struct RisingThreeMethods *h = wickra_rising_three_methods_new(); + if (!h) Rf_error("invalid RisingThreeMethods parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rising_three_methods_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rising_three_methods_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RisingThreeMethods *h = (struct RisingThreeMethods *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rising_three_methods_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rising_three_methods_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RisingThreeMethods *h = (struct RisingThreeMethods *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rising_three_methods_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rising_three_methods_reset(SEXP e) { + struct RisingThreeMethods *h = (struct RisingThreeMethods *)R_ExternalPtrAddr(e); + wickra_rising_three_methods_reset(h); + return R_NilValue; +} + +static void rmi_fin(SEXP e) { + struct Rmi *h = (struct Rmi *)R_ExternalPtrAddr(e); + if (h) wickra_rmi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rmi_new(SEXP a0, SEXP a1) { + struct Rmi *h = wickra_rmi_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Rmi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rmi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rmi_update(SEXP e, SEXP a0) { + struct Rmi *h = (struct Rmi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rmi_update(h, Rf_asReal(a0))); +} +SEXP wk_rmi_batch(SEXP e, SEXP a0) { + struct Rmi *h = (struct Rmi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rmi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rmi_reset(SEXP e) { + struct Rmi *h = (struct Rmi *)R_ExternalPtrAddr(e); + wickra_rmi_reset(h); + return R_NilValue; +} + +static void roc_fin(SEXP e) { + struct Roc *h = (struct Roc *)R_ExternalPtrAddr(e); + if (h) wickra_roc_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_roc_new(SEXP a0) { + struct Roc *h = wickra_roc_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Roc parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, roc_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_roc_update(SEXP e, SEXP a0) { + struct Roc *h = (struct Roc *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_roc_update(h, Rf_asReal(a0))); +} +SEXP wk_roc_batch(SEXP e, SEXP a0) { + struct Roc *h = (struct Roc *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_roc_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_roc_reset(SEXP e) { + struct Roc *h = (struct Roc *)R_ExternalPtrAddr(e); + wickra_roc_reset(h); + return R_NilValue; +} + +static void rocp_fin(SEXP e) { + struct Rocp *h = (struct Rocp *)R_ExternalPtrAddr(e); + if (h) wickra_rocp_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rocp_new(SEXP a0) { + struct Rocp *h = wickra_rocp_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rocp parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rocp_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rocp_update(SEXP e, SEXP a0) { + struct Rocp *h = (struct Rocp *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rocp_update(h, Rf_asReal(a0))); +} +SEXP wk_rocp_batch(SEXP e, SEXP a0) { + struct Rocp *h = (struct Rocp *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rocp_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rocp_reset(SEXP e) { + struct Rocp *h = (struct Rocp *)R_ExternalPtrAddr(e); + wickra_rocp_reset(h); + return R_NilValue; +} + +static void rocr_fin(SEXP e) { + struct Rocr *h = (struct Rocr *)R_ExternalPtrAddr(e); + if (h) wickra_rocr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rocr_new(SEXP a0) { + struct Rocr *h = wickra_rocr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rocr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rocr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rocr_update(SEXP e, SEXP a0) { + struct Rocr *h = (struct Rocr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rocr_update(h, Rf_asReal(a0))); +} +SEXP wk_rocr_batch(SEXP e, SEXP a0) { + struct Rocr *h = (struct Rocr *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rocr_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rocr_reset(SEXP e) { + struct Rocr *h = (struct Rocr *)R_ExternalPtrAddr(e); + wickra_rocr_reset(h); + return R_NilValue; +} + +static void rocr100_fin(SEXP e) { + struct Rocr100 *h = (struct Rocr100 *)R_ExternalPtrAddr(e); + if (h) wickra_rocr100_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rocr100_new(SEXP a0) { + struct Rocr100 *h = wickra_rocr100_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rocr100 parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rocr100_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rocr100_update(SEXP e, SEXP a0) { + struct Rocr100 *h = (struct Rocr100 *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rocr100_update(h, Rf_asReal(a0))); +} +SEXP wk_rocr100_batch(SEXP e, SEXP a0) { + struct Rocr100 *h = (struct Rocr100 *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rocr100_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rocr100_reset(SEXP e) { + struct Rocr100 *h = (struct Rocr100 *)R_ExternalPtrAddr(e); + wickra_rocr100_reset(h); + return R_NilValue; +} + +static void rogers_satchell_volatility_fin(SEXP e) { + struct RogersSatchellVolatility *h = (struct RogersSatchellVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_rogers_satchell_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rogers_satchell_volatility_new(SEXP a0, SEXP a1) { + struct RogersSatchellVolatility *h = wickra_rogers_satchell_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid RogersSatchellVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rogers_satchell_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rogers_satchell_volatility_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RogersSatchellVolatility *h = (struct RogersSatchellVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rogers_satchell_volatility_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rogers_satchell_volatility_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RogersSatchellVolatility *h = (struct RogersSatchellVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rogers_satchell_volatility_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rogers_satchell_volatility_reset(SEXP e) { + struct RogersSatchellVolatility *h = (struct RogersSatchellVolatility *)R_ExternalPtrAddr(e); + wickra_rogers_satchell_volatility_reset(h); + return R_NilValue; +} + +static void roll_measure_fin(SEXP e) { + struct RollMeasure *h = (struct RollMeasure *)R_ExternalPtrAddr(e); + if (h) wickra_roll_measure_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_roll_measure_new(SEXP a0) { + struct RollMeasure *h = wickra_roll_measure_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollMeasure parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, roll_measure_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_roll_measure_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct RollMeasure *h = (struct RollMeasure *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_roll_measure_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_roll_measure_reset(SEXP e) { + struct RollMeasure *h = (struct RollMeasure *)R_ExternalPtrAddr(e); + wickra_roll_measure_reset(h); + return R_NilValue; +} + +static void rolling_correlation_fin(SEXP e) { + struct RollingCorrelation *h = (struct RollingCorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_correlation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_correlation_new(SEXP a0) { + struct RollingCorrelation *h = wickra_rolling_correlation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingCorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_correlation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_correlation_update(SEXP e, SEXP a0, SEXP a1) { + struct RollingCorrelation *h = (struct RollingCorrelation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_correlation_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_rolling_correlation_batch(SEXP e, SEXP a0, SEXP a1) { + struct RollingCorrelation *h = (struct RollingCorrelation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_correlation_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_correlation_reset(SEXP e) { + struct RollingCorrelation *h = (struct RollingCorrelation *)R_ExternalPtrAddr(e); + wickra_rolling_correlation_reset(h); + return R_NilValue; +} + +static void rolling_covariance_fin(SEXP e) { + struct RollingCovariance *h = (struct RollingCovariance *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_covariance_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_covariance_new(SEXP a0) { + struct RollingCovariance *h = wickra_rolling_covariance_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingCovariance parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_covariance_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_covariance_update(SEXP e, SEXP a0, SEXP a1) { + struct RollingCovariance *h = (struct RollingCovariance *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_covariance_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_rolling_covariance_batch(SEXP e, SEXP a0, SEXP a1) { + struct RollingCovariance *h = (struct RollingCovariance *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_covariance_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_covariance_reset(SEXP e) { + struct RollingCovariance *h = (struct RollingCovariance *)R_ExternalPtrAddr(e); + wickra_rolling_covariance_reset(h); + return R_NilValue; +} + +static void rolling_iqr_fin(SEXP e) { + struct RollingIqr *h = (struct RollingIqr *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_iqr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_iqr_new(SEXP a0) { + struct RollingIqr *h = wickra_rolling_iqr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingIqr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_iqr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_iqr_update(SEXP e, SEXP a0) { + struct RollingIqr *h = (struct RollingIqr *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_iqr_update(h, Rf_asReal(a0))); +} +SEXP wk_rolling_iqr_batch(SEXP e, SEXP a0) { + struct RollingIqr *h = (struct RollingIqr *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_iqr_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_iqr_reset(SEXP e) { + struct RollingIqr *h = (struct RollingIqr *)R_ExternalPtrAddr(e); + wickra_rolling_iqr_reset(h); + return R_NilValue; +} + +static void rolling_min_max_scaler_fin(SEXP e) { + struct RollingMinMaxScaler *h = (struct RollingMinMaxScaler *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_min_max_scaler_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_min_max_scaler_new(SEXP a0) { + struct RollingMinMaxScaler *h = wickra_rolling_min_max_scaler_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingMinMaxScaler parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_min_max_scaler_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_min_max_scaler_update(SEXP e, SEXP a0) { + struct RollingMinMaxScaler *h = (struct RollingMinMaxScaler *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_min_max_scaler_update(h, Rf_asReal(a0))); +} +SEXP wk_rolling_min_max_scaler_batch(SEXP e, SEXP a0) { + struct RollingMinMaxScaler *h = (struct RollingMinMaxScaler *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_min_max_scaler_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_min_max_scaler_reset(SEXP e) { + struct RollingMinMaxScaler *h = (struct RollingMinMaxScaler *)R_ExternalPtrAddr(e); + wickra_rolling_min_max_scaler_reset(h); + return R_NilValue; +} + +static void rolling_percentile_rank_fin(SEXP e) { + struct RollingPercentileRank *h = (struct RollingPercentileRank *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_percentile_rank_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_percentile_rank_new(SEXP a0) { + struct RollingPercentileRank *h = wickra_rolling_percentile_rank_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingPercentileRank parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_percentile_rank_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_percentile_rank_update(SEXP e, SEXP a0) { + struct RollingPercentileRank *h = (struct RollingPercentileRank *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_percentile_rank_update(h, Rf_asReal(a0))); +} +SEXP wk_rolling_percentile_rank_batch(SEXP e, SEXP a0) { + struct RollingPercentileRank *h = (struct RollingPercentileRank *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_percentile_rank_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_percentile_rank_reset(SEXP e) { + struct RollingPercentileRank *h = (struct RollingPercentileRank *)R_ExternalPtrAddr(e); + wickra_rolling_percentile_rank_reset(h); + return R_NilValue; +} + +static void rolling_quantile_fin(SEXP e) { + struct RollingQuantile *h = (struct RollingQuantile *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_quantile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_quantile_new(SEXP a0, SEXP a1) { + struct RollingQuantile *h = wickra_rolling_quantile_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid RollingQuantile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_quantile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_quantile_update(SEXP e, SEXP a0) { + struct RollingQuantile *h = (struct RollingQuantile *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_quantile_update(h, Rf_asReal(a0))); +} +SEXP wk_rolling_quantile_batch(SEXP e, SEXP a0) { + struct RollingQuantile *h = (struct RollingQuantile *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rolling_quantile_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_quantile_reset(SEXP e) { + struct RollingQuantile *h = (struct RollingQuantile *)R_ExternalPtrAddr(e); + wickra_rolling_quantile_reset(h); + return R_NilValue; +} + +static void rolling_vwap_fin(SEXP e) { + struct RollingVwap *h = (struct RollingVwap *)R_ExternalPtrAddr(e); + if (h) wickra_rolling_vwap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rolling_vwap_new(SEXP a0) { + struct RollingVwap *h = wickra_rolling_vwap_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RollingVwap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rolling_vwap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rolling_vwap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RollingVwap *h = (struct RollingVwap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rolling_vwap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rolling_vwap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RollingVwap *h = (struct RollingVwap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rolling_vwap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rolling_vwap_reset(SEXP e) { + struct RollingVwap *h = (struct RollingVwap *)R_ExternalPtrAddr(e); + wickra_rolling_vwap_reset(h); + return R_NilValue; +} + +static void roofing_filter_fin(SEXP e) { + struct RoofingFilter *h = (struct RoofingFilter *)R_ExternalPtrAddr(e); + if (h) wickra_roofing_filter_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_roofing_filter_new(SEXP a0, SEXP a1) { + struct RoofingFilter *h = wickra_roofing_filter_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid RoofingFilter parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, roofing_filter_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_roofing_filter_update(SEXP e, SEXP a0) { + struct RoofingFilter *h = (struct RoofingFilter *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_roofing_filter_update(h, Rf_asReal(a0))); +} +SEXP wk_roofing_filter_batch(SEXP e, SEXP a0) { + struct RoofingFilter *h = (struct RoofingFilter *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_roofing_filter_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_roofing_filter_reset(SEXP e) { + struct RoofingFilter *h = (struct RoofingFilter *)R_ExternalPtrAddr(e); + wickra_roofing_filter_reset(h); + return R_NilValue; +} + +static void rsi_fin(SEXP e) { + struct Rsi *h = (struct Rsi *)R_ExternalPtrAddr(e); + if (h) wickra_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rsi_new(SEXP a0) { + struct Rsi *h = wickra_rsi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rsi_update(SEXP e, SEXP a0) { + struct Rsi *h = (struct Rsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_rsi_batch(SEXP e, SEXP a0) { + struct Rsi *h = (struct Rsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rsi_reset(SEXP e) { + struct Rsi *h = (struct Rsi *)R_ExternalPtrAddr(e); + wickra_rsi_reset(h); + return R_NilValue; +} + +static void rsx_fin(SEXP e) { + struct Rsx *h = (struct Rsx *)R_ExternalPtrAddr(e); + if (h) wickra_rsx_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rsx_new(SEXP a0) { + struct Rsx *h = wickra_rsx_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rsx parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rsx_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rsx_update(SEXP e, SEXP a0) { + struct Rsx *h = (struct Rsx *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rsx_update(h, Rf_asReal(a0))); +} +SEXP wk_rsx_batch(SEXP e, SEXP a0) { + struct Rsx *h = (struct Rsx *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rsx_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rsx_reset(SEXP e) { + struct Rsx *h = (struct Rsx *)R_ExternalPtrAddr(e); + wickra_rsx_reset(h); + return R_NilValue; +} + +static void run_bars_fin(SEXP e) { + struct RunBars *h = (struct RunBars *)R_ExternalPtrAddr(e); + if (h) wickra_run_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_run_bars_new(SEXP a0) { + struct RunBars *h = wickra_run_bars_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RunBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, run_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_run_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct RunBars *h = (struct RunBars *)R_ExternalPtrAddr(e); + struct WickraRunBar buf[64]; + size_t n = wickra_run_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 6)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + REAL(r)[i + n * 3] = (double)buf[i].close; + REAL(r)[i + n * 4] = (double)buf[i].length; + REAL(r)[i + n * 5] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 6)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SET_STRING_ELT(cn, 3, Rf_mkChar("close")); + SET_STRING_ELT(cn, 4, Rf_mkChar("length")); + SET_STRING_ELT(cn, 5, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_run_bars_reset(SEXP e) { + struct RunBars *h = (struct RunBars *)R_ExternalPtrAddr(e); + wickra_run_bars_reset(h); + return R_NilValue; +} + +static void rvi_fin(SEXP e) { + struct Rvi *h = (struct Rvi *)R_ExternalPtrAddr(e); + if (h) wickra_rvi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rvi_new(SEXP a0) { + struct Rvi *h = wickra_rvi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rvi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rvi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rvi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Rvi *h = (struct Rvi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rvi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_rvi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Rvi *h = (struct Rvi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_rvi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rvi_reset(SEXP e) { + struct Rvi *h = (struct Rvi *)R_ExternalPtrAddr(e); + wickra_rvi_reset(h); + return R_NilValue; +} + +static void rvi_volatility_fin(SEXP e) { + struct RviVolatility *h = (struct RviVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_rvi_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rvi_volatility_new(SEXP a0) { + struct RviVolatility *h = wickra_rvi_volatility_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid RviVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rvi_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rvi_volatility_update(SEXP e, SEXP a0) { + struct RviVolatility *h = (struct RviVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_rvi_volatility_update(h, Rf_asReal(a0))); +} +SEXP wk_rvi_volatility_batch(SEXP e, SEXP a0) { + struct RviVolatility *h = (struct RviVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_rvi_volatility_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_rvi_volatility_reset(SEXP e) { + struct RviVolatility *h = (struct RviVolatility *)R_ExternalPtrAddr(e); + wickra_rvi_volatility_reset(h); + return R_NilValue; +} + +static void rwi_fin(SEXP e) { + struct Rwi *h = (struct Rwi *)R_ExternalPtrAddr(e); + if (h) wickra_rwi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_rwi_new(SEXP a0) { + struct Rwi *h = wickra_rwi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Rwi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, rwi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_rwi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Rwi *h = (struct Rwi *)R_ExternalPtrAddr(e); + struct WickraRwiOutput out; + int ok = wickra_rwi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.high : NA_REAL; + REAL(r)[1] = ok ? (double)out.low : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("high")); + SET_STRING_ELT(nm, 1, Rf_mkChar("low")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_rwi_reset(SEXP e) { + struct Rwi *h = (struct Rwi *)R_ExternalPtrAddr(e); + wickra_rwi_reset(h); + return R_NilValue; +} + +static void sample_entropy_fin(SEXP e) { + struct SampleEntropy *h = (struct SampleEntropy *)R_ExternalPtrAddr(e); + if (h) wickra_sample_entropy_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sample_entropy_new(SEXP a0, SEXP a1, SEXP a2) { + struct SampleEntropy *h = wickra_sample_entropy_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid SampleEntropy parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sample_entropy_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sample_entropy_update(SEXP e, SEXP a0) { + struct SampleEntropy *h = (struct SampleEntropy *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sample_entropy_update(h, Rf_asReal(a0))); +} +SEXP wk_sample_entropy_batch(SEXP e, SEXP a0) { + struct SampleEntropy *h = (struct SampleEntropy *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sample_entropy_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sample_entropy_reset(SEXP e) { + struct SampleEntropy *h = (struct SampleEntropy *)R_ExternalPtrAddr(e); + wickra_sample_entropy_reset(h); + return R_NilValue; +} + +static void sar_ext_fin(SEXP e) { + struct SarExt *h = (struct SarExt *)R_ExternalPtrAddr(e); + if (h) wickra_sar_ext_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sar_ext_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7) { + struct SarExt *h = wickra_sar_ext_new(Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7)); + if (!h) Rf_error("invalid SarExt parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sar_ext_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sar_ext_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SarExt *h = (struct SarExt *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sar_ext_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_sar_ext_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SarExt *h = (struct SarExt *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_sar_ext_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sar_ext_reset(SEXP e) { + struct SarExt *h = (struct SarExt *)R_ExternalPtrAddr(e); + wickra_sar_ext_reset(h); + return R_NilValue; +} + +static void seasonal_z_score_fin(SEXP e) { + struct SeasonalZScore *h = (struct SeasonalZScore *)R_ExternalPtrAddr(e); + if (h) wickra_seasonal_z_score_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_seasonal_z_score_new(SEXP a0) { + struct SeasonalZScore *h = wickra_seasonal_z_score_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid SeasonalZScore parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, seasonal_z_score_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_seasonal_z_score_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SeasonalZScore *h = (struct SeasonalZScore *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_seasonal_z_score_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_seasonal_z_score_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SeasonalZScore *h = (struct SeasonalZScore *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_seasonal_z_score_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_seasonal_z_score_reset(SEXP e) { + struct SeasonalZScore *h = (struct SeasonalZScore *)R_ExternalPtrAddr(e); + wickra_seasonal_z_score_reset(h); + return R_NilValue; +} + +static void separating_lines_fin(SEXP e) { + struct SeparatingLines *h = (struct SeparatingLines *)R_ExternalPtrAddr(e); + if (h) wickra_separating_lines_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_separating_lines_new(void) { + struct SeparatingLines *h = wickra_separating_lines_new(); + if (!h) Rf_error("invalid SeparatingLines parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, separating_lines_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_separating_lines_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SeparatingLines *h = (struct SeparatingLines *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_separating_lines_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_separating_lines_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SeparatingLines *h = (struct SeparatingLines *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_separating_lines_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_separating_lines_reset(SEXP e) { + struct SeparatingLines *h = (struct SeparatingLines *)R_ExternalPtrAddr(e); + wickra_separating_lines_reset(h); + return R_NilValue; +} + +static void session_high_low_fin(SEXP e) { + struct SessionHighLow *h = (struct SessionHighLow *)R_ExternalPtrAddr(e); + if (h) wickra_session_high_low_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_session_high_low_new(SEXP a0) { + struct SessionHighLow *h = wickra_session_high_low_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid SessionHighLow parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, session_high_low_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_session_high_low_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SessionHighLow *h = (struct SessionHighLow *)R_ExternalPtrAddr(e); + struct WickraSessionHighLowOutput out; + int ok = wickra_session_high_low_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.high : NA_REAL; + REAL(r)[1] = ok ? (double)out.low : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("high")); + SET_STRING_ELT(nm, 1, Rf_mkChar("low")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_session_high_low_reset(SEXP e) { + struct SessionHighLow *h = (struct SessionHighLow *)R_ExternalPtrAddr(e); + wickra_session_high_low_reset(h); + return R_NilValue; +} + +static void session_range_fin(SEXP e) { + struct SessionRange *h = (struct SessionRange *)R_ExternalPtrAddr(e); + if (h) wickra_session_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_session_range_new(SEXP a0) { + struct SessionRange *h = wickra_session_range_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid SessionRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, session_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_session_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SessionRange *h = (struct SessionRange *)R_ExternalPtrAddr(e); + struct WickraSessionRangeOutput out; + int ok = wickra_session_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.asia : NA_REAL; + REAL(r)[1] = ok ? (double)out.eu : NA_REAL; + REAL(r)[2] = ok ? (double)out.us : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("asia")); + SET_STRING_ELT(nm, 1, Rf_mkChar("eu")); + SET_STRING_ELT(nm, 2, Rf_mkChar("us")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_session_range_reset(SEXP e) { + struct SessionRange *h = (struct SessionRange *)R_ExternalPtrAddr(e); + wickra_session_range_reset(h); + return R_NilValue; +} + +static void session_vwap_fin(SEXP e) { + struct SessionVwap *h = (struct SessionVwap *)R_ExternalPtrAddr(e); + if (h) wickra_session_vwap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_session_vwap_new(SEXP a0) { + struct SessionVwap *h = wickra_session_vwap_new((int32_t)Rf_asInteger(a0)); + if (!h) Rf_error("invalid SessionVwap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, session_vwap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_session_vwap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SessionVwap *h = (struct SessionVwap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_session_vwap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_session_vwap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SessionVwap *h = (struct SessionVwap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_session_vwap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_session_vwap_reset(SEXP e) { + struct SessionVwap *h = (struct SessionVwap *)R_ExternalPtrAddr(e); + wickra_session_vwap_reset(h); + return R_NilValue; +} + +static void shannon_entropy_fin(SEXP e) { + struct ShannonEntropy *h = (struct ShannonEntropy *)R_ExternalPtrAddr(e); + if (h) wickra_shannon_entropy_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_shannon_entropy_new(SEXP a0, SEXP a1) { + struct ShannonEntropy *h = wickra_shannon_entropy_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid ShannonEntropy parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, shannon_entropy_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_shannon_entropy_update(SEXP e, SEXP a0) { + struct ShannonEntropy *h = (struct ShannonEntropy *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_shannon_entropy_update(h, Rf_asReal(a0))); +} +SEXP wk_shannon_entropy_batch(SEXP e, SEXP a0) { + struct ShannonEntropy *h = (struct ShannonEntropy *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_shannon_entropy_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_shannon_entropy_reset(SEXP e) { + struct ShannonEntropy *h = (struct ShannonEntropy *)R_ExternalPtrAddr(e); + wickra_shannon_entropy_reset(h); + return R_NilValue; +} + +static void shark_fin(SEXP e) { + struct Shark *h = (struct Shark *)R_ExternalPtrAddr(e); + if (h) wickra_shark_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_shark_new(void) { + struct Shark *h = wickra_shark_new(); + if (!h) Rf_error("invalid Shark parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, shark_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_shark_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Shark *h = (struct Shark *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_shark_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_shark_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Shark *h = (struct Shark *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_shark_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_shark_reset(SEXP e) { + struct Shark *h = (struct Shark *)R_ExternalPtrAddr(e); + wickra_shark_reset(h); + return R_NilValue; +} + +static void sharpe_ratio_fin(SEXP e) { + struct SharpeRatio *h = (struct SharpeRatio *)R_ExternalPtrAddr(e); + if (h) wickra_sharpe_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sharpe_ratio_new(SEXP a0, SEXP a1) { + struct SharpeRatio *h = wickra_sharpe_ratio_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid SharpeRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sharpe_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sharpe_ratio_update(SEXP e, SEXP a0) { + struct SharpeRatio *h = (struct SharpeRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sharpe_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_sharpe_ratio_batch(SEXP e, SEXP a0) { + struct SharpeRatio *h = (struct SharpeRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sharpe_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sharpe_ratio_reset(SEXP e) { + struct SharpeRatio *h = (struct SharpeRatio *)R_ExternalPtrAddr(e); + wickra_sharpe_ratio_reset(h); + return R_NilValue; +} + +static void shooting_star_fin(SEXP e) { + struct ShootingStar *h = (struct ShootingStar *)R_ExternalPtrAddr(e); + if (h) wickra_shooting_star_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_shooting_star_new(void) { + struct ShootingStar *h = wickra_shooting_star_new(); + if (!h) Rf_error("invalid ShootingStar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, shooting_star_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_shooting_star_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ShootingStar *h = (struct ShootingStar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_shooting_star_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_shooting_star_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ShootingStar *h = (struct ShootingStar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_shooting_star_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_shooting_star_reset(SEXP e) { + struct ShootingStar *h = (struct ShootingStar *)R_ExternalPtrAddr(e); + wickra_shooting_star_reset(h); + return R_NilValue; +} + +static void short_line_fin(SEXP e) { + struct ShortLine *h = (struct ShortLine *)R_ExternalPtrAddr(e); + if (h) wickra_short_line_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_short_line_new(void) { + struct ShortLine *h = wickra_short_line_new(); + if (!h) Rf_error("invalid ShortLine parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, short_line_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_short_line_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ShortLine *h = (struct ShortLine *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_short_line_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_short_line_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ShortLine *h = (struct ShortLine *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_short_line_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_short_line_reset(SEXP e) { + struct ShortLine *h = (struct ShortLine *)R_ExternalPtrAddr(e); + wickra_short_line_reset(h); + return R_NilValue; +} + +static void signed_volume_fin(SEXP e) { + struct SignedVolume *h = (struct SignedVolume *)R_ExternalPtrAddr(e); + if (h) wickra_signed_volume_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_signed_volume_new(void) { + struct SignedVolume *h = wickra_signed_volume_new(); + if (!h) Rf_error("invalid SignedVolume parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, signed_volume_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_signed_volume_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct SignedVolume *h = (struct SignedVolume *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_signed_volume_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_signed_volume_reset(SEXP e) { + struct SignedVolume *h = (struct SignedVolume *)R_ExternalPtrAddr(e); + wickra_signed_volume_reset(h); + return R_NilValue; +} + +static void sine_wave_fin(SEXP e) { + struct SineWave *h = (struct SineWave *)R_ExternalPtrAddr(e); + if (h) wickra_sine_wave_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sine_wave_new(void) { + struct SineWave *h = wickra_sine_wave_new(); + if (!h) Rf_error("invalid SineWave parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sine_wave_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sine_wave_update(SEXP e, SEXP a0) { + struct SineWave *h = (struct SineWave *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sine_wave_update(h, Rf_asReal(a0))); +} +SEXP wk_sine_wave_batch(SEXP e, SEXP a0) { + struct SineWave *h = (struct SineWave *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sine_wave_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sine_wave_reset(SEXP e) { + struct SineWave *h = (struct SineWave *)R_ExternalPtrAddr(e); + wickra_sine_wave_reset(h); + return R_NilValue; +} + +static void sine_weighted_ma_fin(SEXP e) { + struct SineWeightedMa *h = (struct SineWeightedMa *)R_ExternalPtrAddr(e); + if (h) wickra_sine_weighted_ma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sine_weighted_ma_new(SEXP a0) { + struct SineWeightedMa *h = wickra_sine_weighted_ma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SineWeightedMa parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sine_weighted_ma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sine_weighted_ma_update(SEXP e, SEXP a0) { + struct SineWeightedMa *h = (struct SineWeightedMa *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sine_weighted_ma_update(h, Rf_asReal(a0))); +} +SEXP wk_sine_weighted_ma_batch(SEXP e, SEXP a0) { + struct SineWeightedMa *h = (struct SineWeightedMa *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sine_weighted_ma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sine_weighted_ma_reset(SEXP e) { + struct SineWeightedMa *h = (struct SineWeightedMa *)R_ExternalPtrAddr(e); + wickra_sine_weighted_ma_reset(h); + return R_NilValue; +} + +static void single_prints_fin(SEXP e) { + struct SinglePrints *h = (struct SinglePrints *)R_ExternalPtrAddr(e); + if (h) wickra_single_prints_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_single_prints_new(SEXP a0, SEXP a1) { + struct SinglePrints *h = wickra_single_prints_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid SinglePrints parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, single_prints_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_single_prints_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SinglePrints *h = (struct SinglePrints *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_single_prints_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_single_prints_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SinglePrints *h = (struct SinglePrints *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_single_prints_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_single_prints_reset(SEXP e) { + struct SinglePrints *h = (struct SinglePrints *)R_ExternalPtrAddr(e); + wickra_single_prints_reset(h); + return R_NilValue; +} + +static void skewness_fin(SEXP e) { + struct Skewness *h = (struct Skewness *)R_ExternalPtrAddr(e); + if (h) wickra_skewness_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_skewness_new(SEXP a0) { + struct Skewness *h = wickra_skewness_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Skewness parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, skewness_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_skewness_update(SEXP e, SEXP a0) { + struct Skewness *h = (struct Skewness *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_skewness_update(h, Rf_asReal(a0))); +} +SEXP wk_skewness_batch(SEXP e, SEXP a0) { + struct Skewness *h = (struct Skewness *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_skewness_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_skewness_reset(SEXP e) { + struct Skewness *h = (struct Skewness *)R_ExternalPtrAddr(e); + wickra_skewness_reset(h); + return R_NilValue; +} + +static void sma_fin(SEXP e) { + struct Sma *h = (struct Sma *)R_ExternalPtrAddr(e); + if (h) wickra_sma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sma_new(SEXP a0) { + struct Sma *h = wickra_sma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Sma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sma_update(SEXP e, SEXP a0) { + struct Sma *h = (struct Sma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sma_update(h, Rf_asReal(a0))); +} +SEXP wk_sma_batch(SEXP e, SEXP a0) { + struct Sma *h = (struct Sma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sma_reset(SEXP e) { + struct Sma *h = (struct Sma *)R_ExternalPtrAddr(e); + wickra_sma_reset(h); + return R_NilValue; +} + +static void smi_fin(SEXP e) { + struct Smi *h = (struct Smi *)R_ExternalPtrAddr(e); + if (h) wickra_smi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_smi_new(SEXP a0, SEXP a1, SEXP a2) { + struct Smi *h = wickra_smi_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid Smi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, smi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_smi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Smi *h = (struct Smi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_smi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_smi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Smi *h = (struct Smi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_smi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_smi_reset(SEXP e) { + struct Smi *h = (struct Smi *)R_ExternalPtrAddr(e); + wickra_smi_reset(h); + return R_NilValue; +} + +static void smma_fin(SEXP e) { + struct Smma *h = (struct Smma *)R_ExternalPtrAddr(e); + if (h) wickra_smma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_smma_new(SEXP a0) { + struct Smma *h = wickra_smma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Smma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, smma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_smma_update(SEXP e, SEXP a0) { + struct Smma *h = (struct Smma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_smma_update(h, Rf_asReal(a0))); +} +SEXP wk_smma_batch(SEXP e, SEXP a0) { + struct Smma *h = (struct Smma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_smma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_smma_reset(SEXP e) { + struct Smma *h = (struct Smma *)R_ExternalPtrAddr(e); + wickra_smma_reset(h); + return R_NilValue; +} + +static void smoothed_heikin_ashi_fin(SEXP e) { + struct SmoothedHeikinAshi *h = (struct SmoothedHeikinAshi *)R_ExternalPtrAddr(e); + if (h) wickra_smoothed_heikin_ashi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_smoothed_heikin_ashi_new(SEXP a0) { + struct SmoothedHeikinAshi *h = wickra_smoothed_heikin_ashi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SmoothedHeikinAshi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, smoothed_heikin_ashi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_smoothed_heikin_ashi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SmoothedHeikinAshi *h = (struct SmoothedHeikinAshi *)R_ExternalPtrAddr(e); + struct WickraSmoothedHeikinAshiOutput out; + int ok = wickra_smoothed_heikin_ashi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.open : NA_REAL; + REAL(r)[1] = ok ? (double)out.high : NA_REAL; + REAL(r)[2] = ok ? (double)out.low : NA_REAL; + REAL(r)[3] = ok ? (double)out.close : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("open")); + SET_STRING_ELT(nm, 1, Rf_mkChar("high")); + SET_STRING_ELT(nm, 2, Rf_mkChar("low")); + SET_STRING_ELT(nm, 3, Rf_mkChar("close")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_smoothed_heikin_ashi_reset(SEXP e) { + struct SmoothedHeikinAshi *h = (struct SmoothedHeikinAshi *)R_ExternalPtrAddr(e); + wickra_smoothed_heikin_ashi_reset(h); + return R_NilValue; +} + +static void sortino_ratio_fin(SEXP e) { + struct SortinoRatio *h = (struct SortinoRatio *)R_ExternalPtrAddr(e); + if (h) wickra_sortino_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sortino_ratio_new(SEXP a0, SEXP a1) { + struct SortinoRatio *h = wickra_sortino_ratio_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid SortinoRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sortino_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sortino_ratio_update(SEXP e, SEXP a0) { + struct SortinoRatio *h = (struct SortinoRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sortino_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_sortino_ratio_batch(SEXP e, SEXP a0) { + struct SortinoRatio *h = (struct SortinoRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sortino_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sortino_ratio_reset(SEXP e) { + struct SortinoRatio *h = (struct SortinoRatio *)R_ExternalPtrAddr(e); + wickra_sortino_ratio_reset(h); + return R_NilValue; +} + +static void spearman_correlation_fin(SEXP e) { + struct SpearmanCorrelation *h = (struct SpearmanCorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_spearman_correlation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_spearman_correlation_new(SEXP a0) { + struct SpearmanCorrelation *h = wickra_spearman_correlation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SpearmanCorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, spearman_correlation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_spearman_correlation_update(SEXP e, SEXP a0, SEXP a1) { + struct SpearmanCorrelation *h = (struct SpearmanCorrelation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_spearman_correlation_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_spearman_correlation_batch(SEXP e, SEXP a0, SEXP a1) { + struct SpearmanCorrelation *h = (struct SpearmanCorrelation *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_spearman_correlation_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_spearman_correlation_reset(SEXP e) { + struct SpearmanCorrelation *h = (struct SpearmanCorrelation *)R_ExternalPtrAddr(e); + wickra_spearman_correlation_reset(h); + return R_NilValue; +} + +static void spinning_top_fin(SEXP e) { + struct SpinningTop *h = (struct SpinningTop *)R_ExternalPtrAddr(e); + if (h) wickra_spinning_top_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_spinning_top_new(void) { + struct SpinningTop *h = wickra_spinning_top_new(); + if (!h) Rf_error("invalid SpinningTop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, spinning_top_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_spinning_top_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SpinningTop *h = (struct SpinningTop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_spinning_top_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_spinning_top_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SpinningTop *h = (struct SpinningTop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_spinning_top_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_spinning_top_reset(SEXP e) { + struct SpinningTop *h = (struct SpinningTop *)R_ExternalPtrAddr(e); + wickra_spinning_top_reset(h); + return R_NilValue; +} + +static void spread_ar1_coefficient_fin(SEXP e) { + struct SpreadAr1Coefficient *h = (struct SpreadAr1Coefficient *)R_ExternalPtrAddr(e); + if (h) wickra_spread_ar1_coefficient_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_spread_ar1_coefficient_new(SEXP a0) { + struct SpreadAr1Coefficient *h = wickra_spread_ar1_coefficient_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SpreadAr1Coefficient parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, spread_ar1_coefficient_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_spread_ar1_coefficient_update(SEXP e, SEXP a0, SEXP a1) { + struct SpreadAr1Coefficient *h = (struct SpreadAr1Coefficient *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_spread_ar1_coefficient_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_spread_ar1_coefficient_batch(SEXP e, SEXP a0, SEXP a1) { + struct SpreadAr1Coefficient *h = (struct SpreadAr1Coefficient *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_spread_ar1_coefficient_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_spread_ar1_coefficient_reset(SEXP e) { + struct SpreadAr1Coefficient *h = (struct SpreadAr1Coefficient *)R_ExternalPtrAddr(e); + wickra_spread_ar1_coefficient_reset(h); + return R_NilValue; +} + +static void spread_bollinger_bands_fin(SEXP e) { + struct SpreadBollingerBands *h = (struct SpreadBollingerBands *)R_ExternalPtrAddr(e); + if (h) wickra_spread_bollinger_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_spread_bollinger_bands_new(SEXP a0, SEXP a1) { + struct SpreadBollingerBands *h = wickra_spread_bollinger_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid SpreadBollingerBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, spread_bollinger_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_spread_bollinger_bands_update(SEXP e, SEXP a0, SEXP a1) { + struct SpreadBollingerBands *h = (struct SpreadBollingerBands *)R_ExternalPtrAddr(e); + struct WickraSpreadBollingerBandsOutput out; + int ok = wickra_spread_bollinger_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.middle : NA_REAL; + REAL(r)[1] = ok ? (double)out.upper : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + REAL(r)[3] = ok ? (double)out.percent_b : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 1, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + SET_STRING_ELT(nm, 3, Rf_mkChar("percent_b")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_spread_bollinger_bands_reset(SEXP e) { + struct SpreadBollingerBands *h = (struct SpreadBollingerBands *)R_ExternalPtrAddr(e); + wickra_spread_bollinger_bands_reset(h); + return R_NilValue; +} + +static void spread_hurst_fin(SEXP e) { + struct SpreadHurst *h = (struct SpreadHurst *)R_ExternalPtrAddr(e); + if (h) wickra_spread_hurst_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_spread_hurst_new(SEXP a0) { + struct SpreadHurst *h = wickra_spread_hurst_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SpreadHurst parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, spread_hurst_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_spread_hurst_update(SEXP e, SEXP a0, SEXP a1) { + struct SpreadHurst *h = (struct SpreadHurst *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_spread_hurst_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_spread_hurst_batch(SEXP e, SEXP a0, SEXP a1) { + struct SpreadHurst *h = (struct SpreadHurst *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_spread_hurst_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_spread_hurst_reset(SEXP e) { + struct SpreadHurst *h = (struct SpreadHurst *)R_ExternalPtrAddr(e); + wickra_spread_hurst_reset(h); + return R_NilValue; +} + +static void stalled_pattern_fin(SEXP e) { + struct StalledPattern *h = (struct StalledPattern *)R_ExternalPtrAddr(e); + if (h) wickra_stalled_pattern_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stalled_pattern_new(void) { + struct StalledPattern *h = wickra_stalled_pattern_new(); + if (!h) Rf_error("invalid StalledPattern parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stalled_pattern_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stalled_pattern_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StalledPattern *h = (struct StalledPattern *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_stalled_pattern_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_stalled_pattern_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StalledPattern *h = (struct StalledPattern *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_stalled_pattern_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_stalled_pattern_reset(SEXP e) { + struct StalledPattern *h = (struct StalledPattern *)R_ExternalPtrAddr(e); + wickra_stalled_pattern_reset(h); + return R_NilValue; +} + +static void standard_error_fin(SEXP e) { + struct StandardError *h = (struct StandardError *)R_ExternalPtrAddr(e); + if (h) wickra_standard_error_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_standard_error_new(SEXP a0) { + struct StandardError *h = wickra_standard_error_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid StandardError parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, standard_error_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_standard_error_update(SEXP e, SEXP a0) { + struct StandardError *h = (struct StandardError *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_standard_error_update(h, Rf_asReal(a0))); +} +SEXP wk_standard_error_batch(SEXP e, SEXP a0) { + struct StandardError *h = (struct StandardError *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_standard_error_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_standard_error_reset(SEXP e) { + struct StandardError *h = (struct StandardError *)R_ExternalPtrAddr(e); + wickra_standard_error_reset(h); + return R_NilValue; +} + +static void standard_error_bands_fin(SEXP e) { + struct StandardErrorBands *h = (struct StandardErrorBands *)R_ExternalPtrAddr(e); + if (h) wickra_standard_error_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_standard_error_bands_new(SEXP a0, SEXP a1) { + struct StandardErrorBands *h = wickra_standard_error_bands_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid StandardErrorBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, standard_error_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_standard_error_bands_update(SEXP e, SEXP a0) { + struct StandardErrorBands *h = (struct StandardErrorBands *)R_ExternalPtrAddr(e); + struct WickraStandardErrorBandsOutput out; + int ok = wickra_standard_error_bands_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_standard_error_bands_reset(SEXP e) { + struct StandardErrorBands *h = (struct StandardErrorBands *)R_ExternalPtrAddr(e); + wickra_standard_error_bands_reset(h); + return R_NilValue; +} + +static void starc_bands_fin(SEXP e) { + struct StarcBands *h = (struct StarcBands *)R_ExternalPtrAddr(e); + if (h) wickra_starc_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_starc_bands_new(SEXP a0, SEXP a1, SEXP a2) { + struct StarcBands *h = wickra_starc_bands_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid StarcBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, starc_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_starc_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StarcBands *h = (struct StarcBands *)R_ExternalPtrAddr(e); + struct WickraStarcBandsOutput out; + int ok = wickra_starc_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_starc_bands_reset(SEXP e) { + struct StarcBands *h = (struct StarcBands *)R_ExternalPtrAddr(e); + wickra_starc_bands_reset(h); + return R_NilValue; +} + +static void stc_fin(SEXP e) { + struct Stc *h = (struct Stc *)R_ExternalPtrAddr(e); + if (h) wickra_stc_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stc_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Stc *h = wickra_stc_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), Rf_asReal(a3)); + if (!h) Rf_error("invalid Stc parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stc_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stc_update(SEXP e, SEXP a0) { + struct Stc *h = (struct Stc *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_stc_update(h, Rf_asReal(a0))); +} +SEXP wk_stc_batch(SEXP e, SEXP a0) { + struct Stc *h = (struct Stc *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_stc_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_stc_reset(SEXP e) { + struct Stc *h = (struct Stc *)R_ExternalPtrAddr(e); + wickra_stc_reset(h); + return R_NilValue; +} + +static void std_dev_fin(SEXP e) { + struct StdDev *h = (struct StdDev *)R_ExternalPtrAddr(e); + if (h) wickra_std_dev_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_std_dev_new(SEXP a0) { + struct StdDev *h = wickra_std_dev_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid StdDev parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, std_dev_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_std_dev_update(SEXP e, SEXP a0) { + struct StdDev *h = (struct StdDev *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_std_dev_update(h, Rf_asReal(a0))); +} +SEXP wk_std_dev_batch(SEXP e, SEXP a0) { + struct StdDev *h = (struct StdDev *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_std_dev_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_std_dev_reset(SEXP e) { + struct StdDev *h = (struct StdDev *)R_ExternalPtrAddr(e); + wickra_std_dev_reset(h); + return R_NilValue; +} + +static void step_trailing_stop_fin(SEXP e) { + struct StepTrailingStop *h = (struct StepTrailingStop *)R_ExternalPtrAddr(e); + if (h) wickra_step_trailing_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_step_trailing_stop_new(SEXP a0) { + struct StepTrailingStop *h = wickra_step_trailing_stop_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid StepTrailingStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, step_trailing_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_step_trailing_stop_update(SEXP e, SEXP a0) { + struct StepTrailingStop *h = (struct StepTrailingStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_step_trailing_stop_update(h, Rf_asReal(a0))); +} +SEXP wk_step_trailing_stop_batch(SEXP e, SEXP a0) { + struct StepTrailingStop *h = (struct StepTrailingStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_step_trailing_stop_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_step_trailing_stop_reset(SEXP e) { + struct StepTrailingStop *h = (struct StepTrailingStop *)R_ExternalPtrAddr(e); + wickra_step_trailing_stop_reset(h); + return R_NilValue; +} + +static void sterling_ratio_fin(SEXP e) { + struct SterlingRatio *h = (struct SterlingRatio *)R_ExternalPtrAddr(e); + if (h) wickra_sterling_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_sterling_ratio_new(SEXP a0) { + struct SterlingRatio *h = wickra_sterling_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SterlingRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, sterling_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_sterling_ratio_update(SEXP e, SEXP a0) { + struct SterlingRatio *h = (struct SterlingRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_sterling_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_sterling_ratio_batch(SEXP e, SEXP a0) { + struct SterlingRatio *h = (struct SterlingRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_sterling_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_sterling_ratio_reset(SEXP e) { + struct SterlingRatio *h = (struct SterlingRatio *)R_ExternalPtrAddr(e); + wickra_sterling_ratio_reset(h); + return R_NilValue; +} + +static void stick_sandwich_fin(SEXP e) { + struct StickSandwich *h = (struct StickSandwich *)R_ExternalPtrAddr(e); + if (h) wickra_stick_sandwich_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stick_sandwich_new(void) { + struct StickSandwich *h = wickra_stick_sandwich_new(); + if (!h) Rf_error("invalid StickSandwich parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stick_sandwich_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stick_sandwich_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StickSandwich *h = (struct StickSandwich *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_stick_sandwich_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_stick_sandwich_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StickSandwich *h = (struct StickSandwich *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_stick_sandwich_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_stick_sandwich_reset(SEXP e) { + struct StickSandwich *h = (struct StickSandwich *)R_ExternalPtrAddr(e); + wickra_stick_sandwich_reset(h); + return R_NilValue; +} + +static void stoch_rsi_fin(SEXP e) { + struct StochRsi *h = (struct StochRsi *)R_ExternalPtrAddr(e); + if (h) wickra_stoch_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stoch_rsi_new(SEXP a0, SEXP a1) { + struct StochRsi *h = wickra_stoch_rsi_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid StochRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stoch_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stoch_rsi_update(SEXP e, SEXP a0) { + struct StochRsi *h = (struct StochRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_stoch_rsi_update(h, Rf_asReal(a0))); +} +SEXP wk_stoch_rsi_batch(SEXP e, SEXP a0) { + struct StochRsi *h = (struct StochRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_stoch_rsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_stoch_rsi_reset(SEXP e) { + struct StochRsi *h = (struct StochRsi *)R_ExternalPtrAddr(e); + wickra_stoch_rsi_reset(h); + return R_NilValue; +} + +static void stochastic_fin(SEXP e) { + struct Stochastic *h = (struct Stochastic *)R_ExternalPtrAddr(e); + if (h) wickra_stochastic_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stochastic_new(SEXP a0, SEXP a1) { + struct Stochastic *h = wickra_stochastic_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Stochastic parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stochastic_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stochastic_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Stochastic *h = (struct Stochastic *)R_ExternalPtrAddr(e); + struct WickraStochasticOutput out; + int ok = wickra_stochastic_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.k : NA_REAL; + REAL(r)[1] = ok ? (double)out.d : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("k")); + SET_STRING_ELT(nm, 1, Rf_mkChar("d")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_stochastic_reset(SEXP e) { + struct Stochastic *h = (struct Stochastic *)R_ExternalPtrAddr(e); + wickra_stochastic_reset(h); + return R_NilValue; +} + +static void stochastic_cci_fin(SEXP e) { + struct StochasticCci *h = (struct StochasticCci *)R_ExternalPtrAddr(e); + if (h) wickra_stochastic_cci_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_stochastic_cci_new(SEXP a0) { + struct StochasticCci *h = wickra_stochastic_cci_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid StochasticCci parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, stochastic_cci_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_stochastic_cci_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StochasticCci *h = (struct StochasticCci *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_stochastic_cci_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_stochastic_cci_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct StochasticCci *h = (struct StochasticCci *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_stochastic_cci_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_stochastic_cci_reset(SEXP e) { + struct StochasticCci *h = (struct StochasticCci *)R_ExternalPtrAddr(e); + wickra_stochastic_cci_reset(h); + return R_NilValue; +} + +static void super_smoother_fin(SEXP e) { + struct SuperSmoother *h = (struct SuperSmoother *)R_ExternalPtrAddr(e); + if (h) wickra_super_smoother_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_super_smoother_new(SEXP a0) { + struct SuperSmoother *h = wickra_super_smoother_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid SuperSmoother parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, super_smoother_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_super_smoother_update(SEXP e, SEXP a0) { + struct SuperSmoother *h = (struct SuperSmoother *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_super_smoother_update(h, Rf_asReal(a0))); +} +SEXP wk_super_smoother_batch(SEXP e, SEXP a0) { + struct SuperSmoother *h = (struct SuperSmoother *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_super_smoother_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_super_smoother_reset(SEXP e) { + struct SuperSmoother *h = (struct SuperSmoother *)R_ExternalPtrAddr(e); + wickra_super_smoother_reset(h); + return R_NilValue; +} + +static void super_trend_fin(SEXP e) { + struct SuperTrend *h = (struct SuperTrend *)R_ExternalPtrAddr(e); + if (h) wickra_super_trend_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_super_trend_new(SEXP a0, SEXP a1) { + struct SuperTrend *h = wickra_super_trend_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid SuperTrend parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, super_trend_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_super_trend_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct SuperTrend *h = (struct SuperTrend *)R_ExternalPtrAddr(e); + struct WickraSuperTrendOutput out; + int ok = wickra_super_trend_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.value : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("value")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_super_trend_reset(SEXP e) { + struct SuperTrend *h = (struct SuperTrend *)R_ExternalPtrAddr(e); + wickra_super_trend_reset(h); + return R_NilValue; +} + +static void t3_fin(SEXP e) { + struct T3 *h = (struct T3 *)R_ExternalPtrAddr(e); + if (h) wickra_t3_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_t3_new(SEXP a0, SEXP a1) { + struct T3 *h = wickra_t3_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid T3 parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, t3_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_t3_update(SEXP e, SEXP a0) { + struct T3 *h = (struct T3 *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_t3_update(h, Rf_asReal(a0))); +} +SEXP wk_t3_batch(SEXP e, SEXP a0) { + struct T3 *h = (struct T3 *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_t3_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_t3_reset(SEXP e) { + struct T3 *h = (struct T3 *)R_ExternalPtrAddr(e); + wickra_t3_reset(h); + return R_NilValue; +} + +static void tail_ratio_fin(SEXP e) { + struct TailRatio *h = (struct TailRatio *)R_ExternalPtrAddr(e); + if (h) wickra_tail_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tail_ratio_new(SEXP a0) { + struct TailRatio *h = wickra_tail_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TailRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tail_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tail_ratio_update(SEXP e, SEXP a0) { + struct TailRatio *h = (struct TailRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tail_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_tail_ratio_batch(SEXP e, SEXP a0) { + struct TailRatio *h = (struct TailRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tail_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tail_ratio_reset(SEXP e) { + struct TailRatio *h = (struct TailRatio *)R_ExternalPtrAddr(e); + wickra_tail_ratio_reset(h); + return R_NilValue; +} + +static void taker_buy_sell_ratio_fin(SEXP e) { + struct TakerBuySellRatio *h = (struct TakerBuySellRatio *)R_ExternalPtrAddr(e); + if (h) wickra_taker_buy_sell_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_taker_buy_sell_ratio_new(void) { + struct TakerBuySellRatio *h = wickra_taker_buy_sell_ratio_new(); + if (!h) Rf_error("invalid TakerBuySellRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, taker_buy_sell_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_taker_buy_sell_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct TakerBuySellRatio *h = (struct TakerBuySellRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_taker_buy_sell_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_taker_buy_sell_ratio_reset(SEXP e) { + struct TakerBuySellRatio *h = (struct TakerBuySellRatio *)R_ExternalPtrAddr(e); + wickra_taker_buy_sell_ratio_reset(h); + return R_NilValue; +} + +static void takuri_fin(SEXP e) { + struct Takuri *h = (struct Takuri *)R_ExternalPtrAddr(e); + if (h) wickra_takuri_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_takuri_new(void) { + struct Takuri *h = wickra_takuri_new(); + if (!h) Rf_error("invalid Takuri parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, takuri_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_takuri_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Takuri *h = (struct Takuri *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_takuri_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_takuri_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Takuri *h = (struct Takuri *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_takuri_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_takuri_reset(SEXP e) { + struct Takuri *h = (struct Takuri *)R_ExternalPtrAddr(e); + wickra_takuri_reset(h); + return R_NilValue; +} + +static void tasuki_gap_fin(SEXP e) { + struct TasukiGap *h = (struct TasukiGap *)R_ExternalPtrAddr(e); + if (h) wickra_tasuki_gap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tasuki_gap_new(void) { + struct TasukiGap *h = wickra_tasuki_gap_new(); + if (!h) Rf_error("invalid TasukiGap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tasuki_gap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tasuki_gap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TasukiGap *h = (struct TasukiGap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tasuki_gap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_tasuki_gap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TasukiGap *h = (struct TasukiGap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_tasuki_gap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tasuki_gap_reset(SEXP e) { + struct TasukiGap *h = (struct TasukiGap *)R_ExternalPtrAddr(e); + wickra_tasuki_gap_reset(h); + return R_NilValue; +} + +static void td_camouflage_fin(SEXP e) { + struct TdCamouflage *h = (struct TdCamouflage *)R_ExternalPtrAddr(e); + if (h) wickra_td_camouflage_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_camouflage_new(void) { + struct TdCamouflage *h = wickra_td_camouflage_new(); + if (!h) Rf_error("invalid TdCamouflage parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_camouflage_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_camouflage_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCamouflage *h = (struct TdCamouflage *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_camouflage_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_camouflage_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCamouflage *h = (struct TdCamouflage *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_camouflage_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_camouflage_reset(SEXP e) { + struct TdCamouflage *h = (struct TdCamouflage *)R_ExternalPtrAddr(e); + wickra_td_camouflage_reset(h); + return R_NilValue; +} + +static void td_clop_fin(SEXP e) { + struct TdClop *h = (struct TdClop *)R_ExternalPtrAddr(e); + if (h) wickra_td_clop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_clop_new(void) { + struct TdClop *h = wickra_td_clop_new(); + if (!h) Rf_error("invalid TdClop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_clop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_clop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdClop *h = (struct TdClop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_clop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_clop_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdClop *h = (struct TdClop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_clop_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_clop_reset(SEXP e) { + struct TdClop *h = (struct TdClop *)R_ExternalPtrAddr(e); + wickra_td_clop_reset(h); + return R_NilValue; +} + +static void td_clopwin_fin(SEXP e) { + struct TdClopwin *h = (struct TdClopwin *)R_ExternalPtrAddr(e); + if (h) wickra_td_clopwin_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_clopwin_new(void) { + struct TdClopwin *h = wickra_td_clopwin_new(); + if (!h) Rf_error("invalid TdClopwin parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_clopwin_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_clopwin_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdClopwin *h = (struct TdClopwin *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_clopwin_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_clopwin_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdClopwin *h = (struct TdClopwin *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_clopwin_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_clopwin_reset(SEXP e) { + struct TdClopwin *h = (struct TdClopwin *)R_ExternalPtrAddr(e); + wickra_td_clopwin_reset(h); + return R_NilValue; +} + +static void td_combo_fin(SEXP e) { + struct TdCombo *h = (struct TdCombo *)R_ExternalPtrAddr(e); + if (h) wickra_td_combo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_combo_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct TdCombo *h = wickra_td_combo_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid TdCombo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_combo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_combo_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCombo *h = (struct TdCombo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_combo_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_combo_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCombo *h = (struct TdCombo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_combo_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_combo_reset(SEXP e) { + struct TdCombo *h = (struct TdCombo *)R_ExternalPtrAddr(e); + wickra_td_combo_reset(h); + return R_NilValue; +} + +static void td_countdown_fin(SEXP e) { + struct TdCountdown *h = (struct TdCountdown *)R_ExternalPtrAddr(e); + if (h) wickra_td_countdown_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_countdown_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct TdCountdown *h = wickra_td_countdown_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid TdCountdown parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_countdown_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_countdown_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCountdown *h = (struct TdCountdown *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_countdown_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_countdown_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdCountdown *h = (struct TdCountdown *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_countdown_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_countdown_reset(SEXP e) { + struct TdCountdown *h = (struct TdCountdown *)R_ExternalPtrAddr(e); + wickra_td_countdown_reset(h); + return R_NilValue; +} + +static void td_d_wave_fin(SEXP e) { + struct TdDWave *h = (struct TdDWave *)R_ExternalPtrAddr(e); + if (h) wickra_td_d_wave_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_d_wave_new(SEXP a0) { + struct TdDWave *h = wickra_td_d_wave_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TdDWave parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_d_wave_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_d_wave_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDWave *h = (struct TdDWave *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_d_wave_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_d_wave_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDWave *h = (struct TdDWave *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_d_wave_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_d_wave_reset(SEXP e) { + struct TdDWave *h = (struct TdDWave *)R_ExternalPtrAddr(e); + wickra_td_d_wave_reset(h); + return R_NilValue; +} + +static void td_de_marker_fin(SEXP e) { + struct TdDeMarker *h = (struct TdDeMarker *)R_ExternalPtrAddr(e); + if (h) wickra_td_de_marker_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_de_marker_new(SEXP a0) { + struct TdDeMarker *h = wickra_td_de_marker_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TdDeMarker parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_de_marker_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_de_marker_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDeMarker *h = (struct TdDeMarker *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_de_marker_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_de_marker_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDeMarker *h = (struct TdDeMarker *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_de_marker_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_de_marker_reset(SEXP e) { + struct TdDeMarker *h = (struct TdDeMarker *)R_ExternalPtrAddr(e); + wickra_td_de_marker_reset(h); + return R_NilValue; +} + +static void td_differential_fin(SEXP e) { + struct TdDifferential *h = (struct TdDifferential *)R_ExternalPtrAddr(e); + if (h) wickra_td_differential_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_differential_new(void) { + struct TdDifferential *h = wickra_td_differential_new(); + if (!h) Rf_error("invalid TdDifferential parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_differential_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_differential_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDifferential *h = (struct TdDifferential *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_differential_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_differential_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdDifferential *h = (struct TdDifferential *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_differential_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_differential_reset(SEXP e) { + struct TdDifferential *h = (struct TdDifferential *)R_ExternalPtrAddr(e); + wickra_td_differential_reset(h); + return R_NilValue; +} + +static void td_lines_fin(SEXP e) { + struct TdLines *h = (struct TdLines *)R_ExternalPtrAddr(e); + if (h) wickra_td_lines_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_lines_new(SEXP a0, SEXP a1) { + struct TdLines *h = wickra_td_lines_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid TdLines parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_lines_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_lines_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdLines *h = (struct TdLines *)R_ExternalPtrAddr(e); + struct WickraTdLinesOutput out; + int ok = wickra_td_lines_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.resistance : NA_REAL; + REAL(r)[1] = ok ? (double)out.support : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("resistance")); + SET_STRING_ELT(nm, 1, Rf_mkChar("support")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_td_lines_reset(SEXP e) { + struct TdLines *h = (struct TdLines *)R_ExternalPtrAddr(e); + wickra_td_lines_reset(h); + return R_NilValue; +} + +static void td_moving_average_fin(SEXP e) { + struct TdMovingAverage *h = (struct TdMovingAverage *)R_ExternalPtrAddr(e); + if (h) wickra_td_moving_average_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_moving_average_new(SEXP a0, SEXP a1) { + struct TdMovingAverage *h = wickra_td_moving_average_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid TdMovingAverage parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_moving_average_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_moving_average_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdMovingAverage *h = (struct TdMovingAverage *)R_ExternalPtrAddr(e); + struct WickraTdMovingAverageOutput out; + int ok = wickra_td_moving_average_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.st1 : NA_REAL; + REAL(r)[1] = ok ? (double)out.st2 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("st1")); + SET_STRING_ELT(nm, 1, Rf_mkChar("st2")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_td_moving_average_reset(SEXP e) { + struct TdMovingAverage *h = (struct TdMovingAverage *)R_ExternalPtrAddr(e); + wickra_td_moving_average_reset(h); + return R_NilValue; +} + +static void td_open_fin(SEXP e) { + struct TdOpen *h = (struct TdOpen *)R_ExternalPtrAddr(e); + if (h) wickra_td_open_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_open_new(void) { + struct TdOpen *h = wickra_td_open_new(); + if (!h) Rf_error("invalid TdOpen parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_open_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_open_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdOpen *h = (struct TdOpen *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_open_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_open_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdOpen *h = (struct TdOpen *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_open_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_open_reset(SEXP e) { + struct TdOpen *h = (struct TdOpen *)R_ExternalPtrAddr(e); + wickra_td_open_reset(h); + return R_NilValue; +} + +static void td_pressure_fin(SEXP e) { + struct TdPressure *h = (struct TdPressure *)R_ExternalPtrAddr(e); + if (h) wickra_td_pressure_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_pressure_new(SEXP a0) { + struct TdPressure *h = wickra_td_pressure_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TdPressure parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_pressure_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_pressure_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdPressure *h = (struct TdPressure *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_pressure_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_pressure_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdPressure *h = (struct TdPressure *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_pressure_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_pressure_reset(SEXP e) { + struct TdPressure *h = (struct TdPressure *)R_ExternalPtrAddr(e); + wickra_td_pressure_reset(h); + return R_NilValue; +} + +static void td_propulsion_fin(SEXP e) { + struct TdPropulsion *h = (struct TdPropulsion *)R_ExternalPtrAddr(e); + if (h) wickra_td_propulsion_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_propulsion_new(void) { + struct TdPropulsion *h = wickra_td_propulsion_new(); + if (!h) Rf_error("invalid TdPropulsion parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_propulsion_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_propulsion_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdPropulsion *h = (struct TdPropulsion *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_propulsion_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_propulsion_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdPropulsion *h = (struct TdPropulsion *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_propulsion_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_propulsion_reset(SEXP e) { + struct TdPropulsion *h = (struct TdPropulsion *)R_ExternalPtrAddr(e); + wickra_td_propulsion_reset(h); + return R_NilValue; +} + +static void td_range_projection_fin(SEXP e) { + struct TdRangeProjection *h = (struct TdRangeProjection *)R_ExternalPtrAddr(e); + if (h) wickra_td_range_projection_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_range_projection_new(void) { + struct TdRangeProjection *h = wickra_td_range_projection_new(); + if (!h) Rf_error("invalid TdRangeProjection parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_range_projection_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_range_projection_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdRangeProjection *h = (struct TdRangeProjection *)R_ExternalPtrAddr(e); + struct WickraTdRangeProjectionOutput out; + int ok = wickra_td_range_projection_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.high : NA_REAL; + REAL(r)[1] = ok ? (double)out.low : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("high")); + SET_STRING_ELT(nm, 1, Rf_mkChar("low")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_td_range_projection_reset(SEXP e) { + struct TdRangeProjection *h = (struct TdRangeProjection *)R_ExternalPtrAddr(e); + wickra_td_range_projection_reset(h); + return R_NilValue; +} + +static void td_rei_fin(SEXP e) { + struct TdRei *h = (struct TdRei *)R_ExternalPtrAddr(e); + if (h) wickra_td_rei_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_rei_new(SEXP a0) { + struct TdRei *h = wickra_td_rei_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TdRei parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_rei_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_rei_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdRei *h = (struct TdRei *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_rei_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_rei_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdRei *h = (struct TdRei *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_rei_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_rei_reset(SEXP e) { + struct TdRei *h = (struct TdRei *)R_ExternalPtrAddr(e); + wickra_td_rei_reset(h); + return R_NilValue; +} + +static void td_risk_level_fin(SEXP e) { + struct TdRiskLevel *h = (struct TdRiskLevel *)R_ExternalPtrAddr(e); + if (h) wickra_td_risk_level_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_risk_level_new(SEXP a0, SEXP a1) { + struct TdRiskLevel *h = wickra_td_risk_level_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid TdRiskLevel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_risk_level_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_risk_level_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdRiskLevel *h = (struct TdRiskLevel *)R_ExternalPtrAddr(e); + struct WickraTdRiskLevelOutput out; + int ok = wickra_td_risk_level_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.buy_risk : NA_REAL; + REAL(r)[1] = ok ? (double)out.sell_risk : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("buy_risk")); + SET_STRING_ELT(nm, 1, Rf_mkChar("sell_risk")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_td_risk_level_reset(SEXP e) { + struct TdRiskLevel *h = (struct TdRiskLevel *)R_ExternalPtrAddr(e); + wickra_td_risk_level_reset(h); + return R_NilValue; +} + +static void td_sequential_fin(SEXP e) { + struct TdSequential *h = (struct TdSequential *)R_ExternalPtrAddr(e); + if (h) wickra_td_sequential_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_sequential_new(SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct TdSequential *h = wickra_td_sequential_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2), (uintptr_t)Rf_asReal(a3)); + if (!h) Rf_error("invalid TdSequential parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_sequential_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_sequential_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdSequential *h = (struct TdSequential *)R_ExternalPtrAddr(e); + struct WickraTdSequentialOutput out; + int ok = wickra_td_sequential_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.setup : NA_REAL; + REAL(r)[1] = ok ? (double)out.countdown : NA_REAL; + REAL(r)[2] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("setup")); + SET_STRING_ELT(nm, 1, Rf_mkChar("countdown")); + SET_STRING_ELT(nm, 2, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_td_sequential_reset(SEXP e) { + struct TdSequential *h = (struct TdSequential *)R_ExternalPtrAddr(e); + wickra_td_sequential_reset(h); + return R_NilValue; +} + +static void td_setup_fin(SEXP e) { + struct TdSetup *h = (struct TdSetup *)R_ExternalPtrAddr(e); + if (h) wickra_td_setup_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_setup_new(SEXP a0, SEXP a1) { + struct TdSetup *h = wickra_td_setup_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid TdSetup parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_setup_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_setup_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdSetup *h = (struct TdSetup *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_setup_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_setup_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdSetup *h = (struct TdSetup *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_setup_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_setup_reset(SEXP e) { + struct TdSetup *h = (struct TdSetup *)R_ExternalPtrAddr(e); + wickra_td_setup_reset(h); + return R_NilValue; +} + +static void td_trap_fin(SEXP e) { + struct TdTrap *h = (struct TdTrap *)R_ExternalPtrAddr(e); + if (h) wickra_td_trap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_td_trap_new(void) { + struct TdTrap *h = wickra_td_trap_new(); + if (!h) Rf_error("invalid TdTrap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, td_trap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_td_trap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdTrap *h = (struct TdTrap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_td_trap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_td_trap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TdTrap *h = (struct TdTrap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_td_trap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_td_trap_reset(SEXP e) { + struct TdTrap *h = (struct TdTrap *)R_ExternalPtrAddr(e); + wickra_td_trap_reset(h); + return R_NilValue; +} + +static void tema_fin(SEXP e) { + struct Tema *h = (struct Tema *)R_ExternalPtrAddr(e); + if (h) wickra_tema_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tema_new(SEXP a0) { + struct Tema *h = wickra_tema_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Tema parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tema_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tema_update(SEXP e, SEXP a0) { + struct Tema *h = (struct Tema *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tema_update(h, Rf_asReal(a0))); +} +SEXP wk_tema_batch(SEXP e, SEXP a0) { + struct Tema *h = (struct Tema *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tema_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tema_reset(SEXP e) { + struct Tema *h = (struct Tema *)R_ExternalPtrAddr(e); + wickra_tema_reset(h); + return R_NilValue; +} + +static void term_structure_basis_fin(SEXP e) { + struct TermStructureBasis *h = (struct TermStructureBasis *)R_ExternalPtrAddr(e); + if (h) wickra_term_structure_basis_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_term_structure_basis_new(void) { + struct TermStructureBasis *h = wickra_term_structure_basis_new(); + if (!h) Rf_error("invalid TermStructureBasis parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, term_structure_basis_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_term_structure_basis_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6, SEXP a7, SEXP a8, SEXP a9, SEXP a10, SEXP a11) { + struct TermStructureBasis *h = (struct TermStructureBasis *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_term_structure_basis_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), Rf_asReal(a5), Rf_asReal(a6), Rf_asReal(a7), Rf_asReal(a8), Rf_asReal(a9), Rf_asReal(a10), (int64_t)Rf_asReal(a11))); +} +SEXP wk_term_structure_basis_reset(SEXP e) { + struct TermStructureBasis *h = (struct TermStructureBasis *)R_ExternalPtrAddr(e); + wickra_term_structure_basis_reset(h); + return R_NilValue; +} + +static void three_drives_fin(SEXP e) { + struct ThreeDrives *h = (struct ThreeDrives *)R_ExternalPtrAddr(e); + if (h) wickra_three_drives_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_drives_new(void) { + struct ThreeDrives *h = wickra_three_drives_new(); + if (!h) Rf_error("invalid ThreeDrives parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_drives_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_drives_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeDrives *h = (struct ThreeDrives *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_drives_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_drives_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeDrives *h = (struct ThreeDrives *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_drives_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_drives_reset(SEXP e) { + struct ThreeDrives *h = (struct ThreeDrives *)R_ExternalPtrAddr(e); + wickra_three_drives_reset(h); + return R_NilValue; +} + +static void three_inside_fin(SEXP e) { + struct ThreeInside *h = (struct ThreeInside *)R_ExternalPtrAddr(e); + if (h) wickra_three_inside_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_inside_new(void) { + struct ThreeInside *h = wickra_three_inside_new(); + if (!h) Rf_error("invalid ThreeInside parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_inside_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_inside_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeInside *h = (struct ThreeInside *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_inside_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_inside_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeInside *h = (struct ThreeInside *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_inside_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_inside_reset(SEXP e) { + struct ThreeInside *h = (struct ThreeInside *)R_ExternalPtrAddr(e); + wickra_three_inside_reset(h); + return R_NilValue; +} + +static void three_line_break_fin(SEXP e) { + struct ThreeLineBreak *h = (struct ThreeLineBreak *)R_ExternalPtrAddr(e); + if (h) wickra_three_line_break_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_line_break_new(SEXP a0) { + struct ThreeLineBreak *h = wickra_three_line_break_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ThreeLineBreak parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_line_break_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_line_break_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeLineBreak *h = (struct ThreeLineBreak *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_line_break_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_line_break_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeLineBreak *h = (struct ThreeLineBreak *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_line_break_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_line_break_reset(SEXP e) { + struct ThreeLineBreak *h = (struct ThreeLineBreak *)R_ExternalPtrAddr(e); + wickra_three_line_break_reset(h); + return R_NilValue; +} + +static void three_line_break_bars_fin(SEXP e) { + struct ThreeLineBreakBars *h = (struct ThreeLineBreakBars *)R_ExternalPtrAddr(e); + if (h) wickra_three_line_break_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_line_break_bars_new(SEXP a0) { + struct ThreeLineBreakBars *h = wickra_three_line_break_bars_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ThreeLineBreakBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_line_break_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_line_break_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeLineBreakBars *h = (struct ThreeLineBreakBars *)R_ExternalPtrAddr(e); + struct WickraLineBreakBar buf[64]; + size_t n = wickra_three_line_break_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 3)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].close; + REAL(r)[i + n * 2] = (double)buf[i].direction; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("close")); + SET_STRING_ELT(cn, 2, Rf_mkChar("direction")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_three_line_break_bars_reset(SEXP e) { + struct ThreeLineBreakBars *h = (struct ThreeLineBreakBars *)R_ExternalPtrAddr(e); + wickra_three_line_break_bars_reset(h); + return R_NilValue; +} + +static void three_line_strike_fin(SEXP e) { + struct ThreeLineStrike *h = (struct ThreeLineStrike *)R_ExternalPtrAddr(e); + if (h) wickra_three_line_strike_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_line_strike_new(void) { + struct ThreeLineStrike *h = wickra_three_line_strike_new(); + if (!h) Rf_error("invalid ThreeLineStrike parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_line_strike_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_line_strike_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeLineStrike *h = (struct ThreeLineStrike *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_line_strike_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_line_strike_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeLineStrike *h = (struct ThreeLineStrike *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_line_strike_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_line_strike_reset(SEXP e) { + struct ThreeLineStrike *h = (struct ThreeLineStrike *)R_ExternalPtrAddr(e); + wickra_three_line_strike_reset(h); + return R_NilValue; +} + +static void three_outside_fin(SEXP e) { + struct ThreeOutside *h = (struct ThreeOutside *)R_ExternalPtrAddr(e); + if (h) wickra_three_outside_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_outside_new(void) { + struct ThreeOutside *h = wickra_three_outside_new(); + if (!h) Rf_error("invalid ThreeOutside parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_outside_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_outside_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeOutside *h = (struct ThreeOutside *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_outside_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_outside_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeOutside *h = (struct ThreeOutside *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_outside_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_outside_reset(SEXP e) { + struct ThreeOutside *h = (struct ThreeOutside *)R_ExternalPtrAddr(e); + wickra_three_outside_reset(h); + return R_NilValue; +} + +static void three_soldiers_or_crows_fin(SEXP e) { + struct ThreeSoldiersOrCrows *h = (struct ThreeSoldiersOrCrows *)R_ExternalPtrAddr(e); + if (h) wickra_three_soldiers_or_crows_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_soldiers_or_crows_new(void) { + struct ThreeSoldiersOrCrows *h = wickra_three_soldiers_or_crows_new(); + if (!h) Rf_error("invalid ThreeSoldiersOrCrows parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_soldiers_or_crows_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_soldiers_or_crows_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeSoldiersOrCrows *h = (struct ThreeSoldiersOrCrows *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_soldiers_or_crows_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_soldiers_or_crows_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeSoldiersOrCrows *h = (struct ThreeSoldiersOrCrows *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_soldiers_or_crows_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_soldiers_or_crows_reset(SEXP e) { + struct ThreeSoldiersOrCrows *h = (struct ThreeSoldiersOrCrows *)R_ExternalPtrAddr(e); + wickra_three_soldiers_or_crows_reset(h); + return R_NilValue; +} + +static void three_stars_in_south_fin(SEXP e) { + struct ThreeStarsInSouth *h = (struct ThreeStarsInSouth *)R_ExternalPtrAddr(e); + if (h) wickra_three_stars_in_south_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_three_stars_in_south_new(void) { + struct ThreeStarsInSouth *h = wickra_three_stars_in_south_new(); + if (!h) Rf_error("invalid ThreeStarsInSouth parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, three_stars_in_south_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_three_stars_in_south_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeStarsInSouth *h = (struct ThreeStarsInSouth *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_three_stars_in_south_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_three_stars_in_south_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ThreeStarsInSouth *h = (struct ThreeStarsInSouth *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_three_stars_in_south_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_three_stars_in_south_reset(SEXP e) { + struct ThreeStarsInSouth *h = (struct ThreeStarsInSouth *)R_ExternalPtrAddr(e); + wickra_three_stars_in_south_reset(h); + return R_NilValue; +} + +static void thrusting_fin(SEXP e) { + struct Thrusting *h = (struct Thrusting *)R_ExternalPtrAddr(e); + if (h) wickra_thrusting_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_thrusting_new(void) { + struct Thrusting *h = wickra_thrusting_new(); + if (!h) Rf_error("invalid Thrusting parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, thrusting_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_thrusting_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Thrusting *h = (struct Thrusting *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_thrusting_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_thrusting_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Thrusting *h = (struct Thrusting *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_thrusting_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_thrusting_reset(SEXP e) { + struct Thrusting *h = (struct Thrusting *)R_ExternalPtrAddr(e); + wickra_thrusting_reset(h); + return R_NilValue; +} + +static void tick_bars_fin(SEXP e) { + struct TickBars *h = (struct TickBars *)R_ExternalPtrAddr(e); + if (h) wickra_tick_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tick_bars_new(SEXP a0) { + struct TickBars *h = wickra_tick_bars_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TickBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tick_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tick_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TickBars *h = (struct TickBars *)R_ExternalPtrAddr(e); + struct WickraTickBar buf[64]; + size_t n = wickra_tick_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 5)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + REAL(r)[i + n * 3] = (double)buf[i].close; + REAL(r)[i + n * 4] = (double)buf[i].volume; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SET_STRING_ELT(cn, 3, Rf_mkChar("close")); + SET_STRING_ELT(cn, 4, Rf_mkChar("volume")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_tick_bars_reset(SEXP e) { + struct TickBars *h = (struct TickBars *)R_ExternalPtrAddr(e); + wickra_tick_bars_reset(h); + return R_NilValue; +} + +static void tick_index_fin(SEXP e) { + struct TickIndex *h = (struct TickIndex *)R_ExternalPtrAddr(e); + if (h) wickra_tick_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tick_index_new(void) { + struct TickIndex *h = wickra_tick_index_new(); + if (!h) Rf_error("invalid TickIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tick_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tick_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct TickIndex *h = (struct TickIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tick_index_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_tick_index_reset(SEXP e) { + struct TickIndex *h = (struct TickIndex *)R_ExternalPtrAddr(e); + wickra_tick_index_reset(h); + return R_NilValue; +} + +static void tii_fin(SEXP e) { + struct Tii *h = (struct Tii *)R_ExternalPtrAddr(e); + if (h) wickra_tii_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tii_new(SEXP a0, SEXP a1) { + struct Tii *h = wickra_tii_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Tii parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tii_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tii_update(SEXP e, SEXP a0) { + struct Tii *h = (struct Tii *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tii_update(h, Rf_asReal(a0))); +} +SEXP wk_tii_batch(SEXP e, SEXP a0) { + struct Tii *h = (struct Tii *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tii_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tii_reset(SEXP e) { + struct Tii *h = (struct Tii *)R_ExternalPtrAddr(e); + wickra_tii_reset(h); + return R_NilValue; +} + +static void time_based_stop_fin(SEXP e) { + struct TimeBasedStop *h = (struct TimeBasedStop *)R_ExternalPtrAddr(e); + if (h) wickra_time_based_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_time_based_stop_new(SEXP a0) { + struct TimeBasedStop *h = wickra_time_based_stop_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TimeBasedStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, time_based_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_time_based_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TimeBasedStop *h = (struct TimeBasedStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_time_based_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_time_based_stop_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TimeBasedStop *h = (struct TimeBasedStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_time_based_stop_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_time_based_stop_reset(SEXP e) { + struct TimeBasedStop *h = (struct TimeBasedStop *)R_ExternalPtrAddr(e); + wickra_time_based_stop_reset(h); + return R_NilValue; +} + +static void time_of_day_return_profile_fin(SEXP e) { + struct TimeOfDayReturnProfile *h = (struct TimeOfDayReturnProfile *)R_ExternalPtrAddr(e); + if (h) wickra_time_of_day_return_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_time_of_day_return_profile_new(SEXP a0, SEXP a1) { + struct TimeOfDayReturnProfile *h = wickra_time_of_day_return_profile_new((uintptr_t)Rf_asReal(a0), (int32_t)Rf_asInteger(a1)); + if (!h) Rf_error("invalid TimeOfDayReturnProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, time_of_day_return_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_time_of_day_return_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct TimeOfDayReturnProfile *h = (struct TimeOfDayReturnProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + R_xlen_t n = wickra_time_of_day_return_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + UNPROTECT(2); + return vv; +} +SEXP wk_time_of_day_return_profile_reset(SEXP e) { + struct TimeOfDayReturnProfile *h = (struct TimeOfDayReturnProfile *)R_ExternalPtrAddr(e); + wickra_time_of_day_return_profile_reset(h); + return R_NilValue; +} + +static void tower_top_bottom_fin(SEXP e) { + struct TowerTopBottom *h = (struct TowerTopBottom *)R_ExternalPtrAddr(e); + if (h) wickra_tower_top_bottom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tower_top_bottom_new(void) { + struct TowerTopBottom *h = wickra_tower_top_bottom_new(); + if (!h) Rf_error("invalid TowerTopBottom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tower_top_bottom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tower_top_bottom_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TowerTopBottom *h = (struct TowerTopBottom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tower_top_bottom_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_tower_top_bottom_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TowerTopBottom *h = (struct TowerTopBottom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_tower_top_bottom_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tower_top_bottom_reset(SEXP e) { + struct TowerTopBottom *h = (struct TowerTopBottom *)R_ExternalPtrAddr(e); + wickra_tower_top_bottom_reset(h); + return R_NilValue; +} + +static void tpo_profile_fin(SEXP e) { + struct TpoProfile *h = (struct TpoProfile *)R_ExternalPtrAddr(e); + if (h) wickra_tpo_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tpo_profile_new(SEXP a0, SEXP a1) { + struct TpoProfile *h = wickra_tpo_profile_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid TpoProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tpo_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tpo_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct TpoProfile *h = (struct TpoProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + struct WickraTpoProfileOutputScalars sc; + R_xlen_t n = wickra_tpo_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &sc, REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP out = PROTECT(Rf_allocVector(VECSXP, 3)); + SEXP onm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_VECTOR_ELT(out, 0, Rf_ScalarReal((double)sc.price_low)); + SET_STRING_ELT(onm, 0, Rf_mkChar("price_low")); + SET_VECTOR_ELT(out, 1, Rf_ScalarReal((double)sc.price_high)); + SET_STRING_ELT(onm, 1, Rf_mkChar("price_high")); + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + SET_VECTOR_ELT(out, 2, vv); + SET_STRING_ELT(onm, 2, Rf_mkChar("values")); + Rf_setAttrib(out, R_NamesSymbol, onm); + UNPROTECT(4); + return out; +} +SEXP wk_tpo_profile_reset(SEXP e) { + struct TpoProfile *h = (struct TpoProfile *)R_ExternalPtrAddr(e); + wickra_tpo_profile_reset(h); + return R_NilValue; +} + +static void trade_imbalance_fin(SEXP e) { + struct TradeImbalance *h = (struct TradeImbalance *)R_ExternalPtrAddr(e); + if (h) wickra_trade_imbalance_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trade_imbalance_new(SEXP a0) { + struct TradeImbalance *h = wickra_trade_imbalance_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TradeImbalance parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trade_imbalance_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trade_imbalance_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct TradeImbalance *h = (struct TradeImbalance *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trade_imbalance_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_trade_imbalance_reset(SEXP e) { + struct TradeImbalance *h = (struct TradeImbalance *)R_ExternalPtrAddr(e); + wickra_trade_imbalance_reset(h); + return R_NilValue; +} + +static void trade_sign_autocorrelation_fin(SEXP e) { + struct TradeSignAutocorrelation *h = (struct TradeSignAutocorrelation *)R_ExternalPtrAddr(e); + if (h) wickra_trade_sign_autocorrelation_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trade_sign_autocorrelation_new(SEXP a0) { + struct TradeSignAutocorrelation *h = wickra_trade_sign_autocorrelation_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TradeSignAutocorrelation parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trade_sign_autocorrelation_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trade_sign_autocorrelation_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct TradeSignAutocorrelation *h = (struct TradeSignAutocorrelation *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trade_sign_autocorrelation_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_trade_sign_autocorrelation_reset(SEXP e) { + struct TradeSignAutocorrelation *h = (struct TradeSignAutocorrelation *)R_ExternalPtrAddr(e); + wickra_trade_sign_autocorrelation_reset(h); + return R_NilValue; +} + +static void trade_volume_index_fin(SEXP e) { + struct TradeVolumeIndex *h = (struct TradeVolumeIndex *)R_ExternalPtrAddr(e); + if (h) wickra_trade_volume_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trade_volume_index_new(SEXP a0) { + struct TradeVolumeIndex *h = wickra_trade_volume_index_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid TradeVolumeIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trade_volume_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trade_volume_index_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TradeVolumeIndex *h = (struct TradeVolumeIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trade_volume_index_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_trade_volume_index_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TradeVolumeIndex *h = (struct TradeVolumeIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_trade_volume_index_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trade_volume_index_reset(SEXP e) { + struct TradeVolumeIndex *h = (struct TradeVolumeIndex *)R_ExternalPtrAddr(e); + wickra_trade_volume_index_reset(h); + return R_NilValue; +} + +static void trend_label_fin(SEXP e) { + struct TrendLabel *h = (struct TrendLabel *)R_ExternalPtrAddr(e); + if (h) wickra_trend_label_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trend_label_new(SEXP a0) { + struct TrendLabel *h = wickra_trend_label_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TrendLabel parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trend_label_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trend_label_update(SEXP e, SEXP a0) { + struct TrendLabel *h = (struct TrendLabel *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trend_label_update(h, Rf_asReal(a0))); +} +SEXP wk_trend_label_batch(SEXP e, SEXP a0) { + struct TrendLabel *h = (struct TrendLabel *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_trend_label_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trend_label_reset(SEXP e) { + struct TrendLabel *h = (struct TrendLabel *)R_ExternalPtrAddr(e); + wickra_trend_label_reset(h); + return R_NilValue; +} + +static void trend_strength_index_fin(SEXP e) { + struct TrendStrengthIndex *h = (struct TrendStrengthIndex *)R_ExternalPtrAddr(e); + if (h) wickra_trend_strength_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trend_strength_index_new(SEXP a0) { + struct TrendStrengthIndex *h = wickra_trend_strength_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TrendStrengthIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trend_strength_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trend_strength_index_update(SEXP e, SEXP a0) { + struct TrendStrengthIndex *h = (struct TrendStrengthIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trend_strength_index_update(h, Rf_asReal(a0))); +} +SEXP wk_trend_strength_index_batch(SEXP e, SEXP a0) { + struct TrendStrengthIndex *h = (struct TrendStrengthIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_trend_strength_index_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trend_strength_index_reset(SEXP e) { + struct TrendStrengthIndex *h = (struct TrendStrengthIndex *)R_ExternalPtrAddr(e); + wickra_trend_strength_index_reset(h); + return R_NilValue; +} + +static void trendflex_fin(SEXP e) { + struct Trendflex *h = (struct Trendflex *)R_ExternalPtrAddr(e); + if (h) wickra_trendflex_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trendflex_new(SEXP a0) { + struct Trendflex *h = wickra_trendflex_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Trendflex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trendflex_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trendflex_update(SEXP e, SEXP a0) { + struct Trendflex *h = (struct Trendflex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trendflex_update(h, Rf_asReal(a0))); +} +SEXP wk_trendflex_batch(SEXP e, SEXP a0) { + struct Trendflex *h = (struct Trendflex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_trendflex_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trendflex_reset(SEXP e) { + struct Trendflex *h = (struct Trendflex *)R_ExternalPtrAddr(e); + wickra_trendflex_reset(h); + return R_NilValue; +} + +static void treynor_ratio_fin(SEXP e) { + struct TreynorRatio *h = (struct TreynorRatio *)R_ExternalPtrAddr(e); + if (h) wickra_treynor_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_treynor_ratio_new(SEXP a0, SEXP a1) { + struct TreynorRatio *h = wickra_treynor_ratio_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid TreynorRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, treynor_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_treynor_ratio_update(SEXP e, SEXP a0, SEXP a1) { + struct TreynorRatio *h = (struct TreynorRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_treynor_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_treynor_ratio_batch(SEXP e, SEXP a0, SEXP a1) { + struct TreynorRatio *h = (struct TreynorRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_treynor_ratio_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_treynor_ratio_reset(SEXP e) { + struct TreynorRatio *h = (struct TreynorRatio *)R_ExternalPtrAddr(e); + wickra_treynor_ratio_reset(h); + return R_NilValue; +} + +static void triangle_fin(SEXP e) { + struct Triangle *h = (struct Triangle *)R_ExternalPtrAddr(e); + if (h) wickra_triangle_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_triangle_new(void) { + struct Triangle *h = wickra_triangle_new(); + if (!h) Rf_error("invalid Triangle parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, triangle_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_triangle_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Triangle *h = (struct Triangle *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_triangle_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_triangle_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Triangle *h = (struct Triangle *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_triangle_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_triangle_reset(SEXP e) { + struct Triangle *h = (struct Triangle *)R_ExternalPtrAddr(e); + wickra_triangle_reset(h); + return R_NilValue; +} + +static void trima_fin(SEXP e) { + struct Trima *h = (struct Trima *)R_ExternalPtrAddr(e); + if (h) wickra_trima_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trima_new(SEXP a0) { + struct Trima *h = wickra_trima_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Trima parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trima_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trima_update(SEXP e, SEXP a0) { + struct Trima *h = (struct Trima *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trima_update(h, Rf_asReal(a0))); +} +SEXP wk_trima_batch(SEXP e, SEXP a0) { + struct Trima *h = (struct Trima *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_trima_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trima_reset(SEXP e) { + struct Trima *h = (struct Trima *)R_ExternalPtrAddr(e); + wickra_trima_reset(h); + return R_NilValue; +} + +static void trin_fin(SEXP e) { + struct Trin *h = (struct Trin *)R_ExternalPtrAddr(e); + if (h) wickra_trin_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trin_new(void) { + struct Trin *h = wickra_trin_new(); + if (!h) Rf_error("invalid Trin parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trin_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trin_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct Trin *h = (struct Trin *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trin_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_trin_reset(SEXP e) { + struct Trin *h = (struct Trin *)R_ExternalPtrAddr(e); + wickra_trin_reset(h); + return R_NilValue; +} + +static void triple_top_bottom_fin(SEXP e) { + struct TripleTopBottom *h = (struct TripleTopBottom *)R_ExternalPtrAddr(e); + if (h) wickra_triple_top_bottom_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_triple_top_bottom_new(void) { + struct TripleTopBottom *h = wickra_triple_top_bottom_new(); + if (!h) Rf_error("invalid TripleTopBottom parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, triple_top_bottom_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_triple_top_bottom_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TripleTopBottom *h = (struct TripleTopBottom *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_triple_top_bottom_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_triple_top_bottom_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TripleTopBottom *h = (struct TripleTopBottom *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_triple_top_bottom_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_triple_top_bottom_reset(SEXP e) { + struct TripleTopBottom *h = (struct TripleTopBottom *)R_ExternalPtrAddr(e); + wickra_triple_top_bottom_reset(h); + return R_NilValue; +} + +static void tristar_fin(SEXP e) { + struct Tristar *h = (struct Tristar *)R_ExternalPtrAddr(e); + if (h) wickra_tristar_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tristar_new(void) { + struct Tristar *h = wickra_tristar_new(); + if (!h) Rf_error("invalid Tristar parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tristar_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tristar_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tristar *h = (struct Tristar *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tristar_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_tristar_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tristar *h = (struct Tristar *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_tristar_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tristar_reset(SEXP e) { + struct Tristar *h = (struct Tristar *)R_ExternalPtrAddr(e); + wickra_tristar_reset(h); + return R_NilValue; +} + +static void trix_fin(SEXP e) { + struct Trix *h = (struct Trix *)R_ExternalPtrAddr(e); + if (h) wickra_trix_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_trix_new(SEXP a0) { + struct Trix *h = wickra_trix_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Trix parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, trix_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_trix_update(SEXP e, SEXP a0) { + struct Trix *h = (struct Trix *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_trix_update(h, Rf_asReal(a0))); +} +SEXP wk_trix_batch(SEXP e, SEXP a0) { + struct Trix *h = (struct Trix *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_trix_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_trix_reset(SEXP e) { + struct Trix *h = (struct Trix *)R_ExternalPtrAddr(e); + wickra_trix_reset(h); + return R_NilValue; +} + +static void true_range_fin(SEXP e) { + struct TrueRange *h = (struct TrueRange *)R_ExternalPtrAddr(e); + if (h) wickra_true_range_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_true_range_new(void) { + struct TrueRange *h = wickra_true_range_new(); + if (!h) Rf_error("invalid TrueRange parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, true_range_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_true_range_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TrueRange *h = (struct TrueRange *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_true_range_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_true_range_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TrueRange *h = (struct TrueRange *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_true_range_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_true_range_reset(SEXP e) { + struct TrueRange *h = (struct TrueRange *)R_ExternalPtrAddr(e); + wickra_true_range_reset(h); + return R_NilValue; +} + +static void tsf_fin(SEXP e) { + struct Tsf *h = (struct Tsf *)R_ExternalPtrAddr(e); + if (h) wickra_tsf_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tsf_new(SEXP a0) { + struct Tsf *h = wickra_tsf_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Tsf parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tsf_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tsf_update(SEXP e, SEXP a0) { + struct Tsf *h = (struct Tsf *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tsf_update(h, Rf_asReal(a0))); +} +SEXP wk_tsf_batch(SEXP e, SEXP a0) { + struct Tsf *h = (struct Tsf *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tsf_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tsf_reset(SEXP e) { + struct Tsf *h = (struct Tsf *)R_ExternalPtrAddr(e); + wickra_tsf_reset(h); + return R_NilValue; +} + +static void tsf_oscillator_fin(SEXP e) { + struct TsfOscillator *h = (struct TsfOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_tsf_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tsf_oscillator_new(SEXP a0) { + struct TsfOscillator *h = wickra_tsf_oscillator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TsfOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tsf_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tsf_oscillator_update(SEXP e, SEXP a0) { + struct TsfOscillator *h = (struct TsfOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tsf_oscillator_update(h, Rf_asReal(a0))); +} +SEXP wk_tsf_oscillator_batch(SEXP e, SEXP a0) { + struct TsfOscillator *h = (struct TsfOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tsf_oscillator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tsf_oscillator_reset(SEXP e) { + struct TsfOscillator *h = (struct TsfOscillator *)R_ExternalPtrAddr(e); + wickra_tsf_oscillator_reset(h); + return R_NilValue; +} + +static void tsi_fin(SEXP e) { + struct Tsi *h = (struct Tsi *)R_ExternalPtrAddr(e); + if (h) wickra_tsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tsi_new(SEXP a0, SEXP a1) { + struct Tsi *h = wickra_tsi_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Tsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tsi_update(SEXP e, SEXP a0) { + struct Tsi *h = (struct Tsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tsi_update(h, Rf_asReal(a0))); +} +SEXP wk_tsi_batch(SEXP e, SEXP a0) { + struct Tsi *h = (struct Tsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_tsi_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tsi_reset(SEXP e) { + struct Tsi *h = (struct Tsi *)R_ExternalPtrAddr(e); + wickra_tsi_reset(h); + return R_NilValue; +} + +static void tsv_fin(SEXP e) { + struct Tsv *h = (struct Tsv *)R_ExternalPtrAddr(e); + if (h) wickra_tsv_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tsv_new(SEXP a0) { + struct Tsv *h = wickra_tsv_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Tsv parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tsv_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tsv_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tsv *h = (struct Tsv *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tsv_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_tsv_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tsv *h = (struct Tsv *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_tsv_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tsv_reset(SEXP e) { + struct Tsv *h = (struct Tsv *)R_ExternalPtrAddr(e); + wickra_tsv_reset(h); + return R_NilValue; +} + +static void ttm_squeeze_fin(SEXP e) { + struct TtmSqueeze *h = (struct TtmSqueeze *)R_ExternalPtrAddr(e); + if (h) wickra_ttm_squeeze_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ttm_squeeze_new(SEXP a0, SEXP a1, SEXP a2) { + struct TtmSqueeze *h = wickra_ttm_squeeze_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid TtmSqueeze parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ttm_squeeze_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ttm_squeeze_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TtmSqueeze *h = (struct TtmSqueeze *)R_ExternalPtrAddr(e); + struct WickraTtmSqueezeOutput out; + int ok = wickra_ttm_squeeze_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.squeeze : NA_REAL; + REAL(r)[1] = ok ? (double)out.momentum : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("squeeze")); + SET_STRING_ELT(nm, 1, Rf_mkChar("momentum")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_ttm_squeeze_reset(SEXP e) { + struct TtmSqueeze *h = (struct TtmSqueeze *)R_ExternalPtrAddr(e); + wickra_ttm_squeeze_reset(h); + return R_NilValue; +} + +static void ttm_trend_fin(SEXP e) { + struct TtmTrend *h = (struct TtmTrend *)R_ExternalPtrAddr(e); + if (h) wickra_ttm_trend_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ttm_trend_new(SEXP a0) { + struct TtmTrend *h = wickra_ttm_trend_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TtmTrend parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ttm_trend_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ttm_trend_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TtmTrend *h = (struct TtmTrend *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ttm_trend_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_ttm_trend_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TtmTrend *h = (struct TtmTrend *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_ttm_trend_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ttm_trend_reset(SEXP e) { + struct TtmTrend *h = (struct TtmTrend *)R_ExternalPtrAddr(e); + wickra_ttm_trend_reset(h); + return R_NilValue; +} + +static void turn_of_month_fin(SEXP e) { + struct TurnOfMonth *h = (struct TurnOfMonth *)R_ExternalPtrAddr(e); + if (h) wickra_turn_of_month_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_turn_of_month_new(SEXP a0, SEXP a1, SEXP a2) { + struct TurnOfMonth *h = wickra_turn_of_month_new((uint32_t)Rf_asInteger(a0), (uint32_t)Rf_asInteger(a1), (int32_t)Rf_asInteger(a2)); + if (!h) Rf_error("invalid TurnOfMonth parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, turn_of_month_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_turn_of_month_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TurnOfMonth *h = (struct TurnOfMonth *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_turn_of_month_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_turn_of_month_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TurnOfMonth *h = (struct TurnOfMonth *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_turn_of_month_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_turn_of_month_reset(SEXP e) { + struct TurnOfMonth *h = (struct TurnOfMonth *)R_ExternalPtrAddr(e); + wickra_turn_of_month_reset(h); + return R_NilValue; +} + +static void tweezer_fin(SEXP e) { + struct Tweezer *h = (struct Tweezer *)R_ExternalPtrAddr(e); + if (h) wickra_tweezer_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_tweezer_new(void) { + struct Tweezer *h = wickra_tweezer_new(); + if (!h) Rf_error("invalid Tweezer parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, tweezer_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_tweezer_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tweezer *h = (struct Tweezer *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_tweezer_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_tweezer_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Tweezer *h = (struct Tweezer *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_tweezer_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_tweezer_reset(SEXP e) { + struct Tweezer *h = (struct Tweezer *)R_ExternalPtrAddr(e); + wickra_tweezer_reset(h); + return R_NilValue; +} + +static void twiggs_money_flow_fin(SEXP e) { + struct TwiggsMoneyFlow *h = (struct TwiggsMoneyFlow *)R_ExternalPtrAddr(e); + if (h) wickra_twiggs_money_flow_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_twiggs_money_flow_new(SEXP a0) { + struct TwiggsMoneyFlow *h = wickra_twiggs_money_flow_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid TwiggsMoneyFlow parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, twiggs_money_flow_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_twiggs_money_flow_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TwiggsMoneyFlow *h = (struct TwiggsMoneyFlow *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_twiggs_money_flow_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_twiggs_money_flow_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TwiggsMoneyFlow *h = (struct TwiggsMoneyFlow *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_twiggs_money_flow_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_twiggs_money_flow_reset(SEXP e) { + struct TwiggsMoneyFlow *h = (struct TwiggsMoneyFlow *)R_ExternalPtrAddr(e); + wickra_twiggs_money_flow_reset(h); + return R_NilValue; +} + +static void two_crows_fin(SEXP e) { + struct TwoCrows *h = (struct TwoCrows *)R_ExternalPtrAddr(e); + if (h) wickra_two_crows_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_two_crows_new(void) { + struct TwoCrows *h = wickra_two_crows_new(); + if (!h) Rf_error("invalid TwoCrows parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, two_crows_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_two_crows_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TwoCrows *h = (struct TwoCrows *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_two_crows_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_two_crows_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TwoCrows *h = (struct TwoCrows *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_two_crows_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_two_crows_reset(SEXP e) { + struct TwoCrows *h = (struct TwoCrows *)R_ExternalPtrAddr(e); + wickra_two_crows_reset(h); + return R_NilValue; +} + +static void typical_price_fin(SEXP e) { + struct TypicalPrice *h = (struct TypicalPrice *)R_ExternalPtrAddr(e); + if (h) wickra_typical_price_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_typical_price_new(void) { + struct TypicalPrice *h = wickra_typical_price_new(); + if (!h) Rf_error("invalid TypicalPrice parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, typical_price_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_typical_price_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TypicalPrice *h = (struct TypicalPrice *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_typical_price_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_typical_price_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct TypicalPrice *h = (struct TypicalPrice *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_typical_price_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_typical_price_reset(SEXP e) { + struct TypicalPrice *h = (struct TypicalPrice *)R_ExternalPtrAddr(e); + wickra_typical_price_reset(h); + return R_NilValue; +} + +static void ulcer_index_fin(SEXP e) { + struct UlcerIndex *h = (struct UlcerIndex *)R_ExternalPtrAddr(e); + if (h) wickra_ulcer_index_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ulcer_index_new(SEXP a0) { + struct UlcerIndex *h = wickra_ulcer_index_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid UlcerIndex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ulcer_index_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ulcer_index_update(SEXP e, SEXP a0) { + struct UlcerIndex *h = (struct UlcerIndex *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ulcer_index_update(h, Rf_asReal(a0))); +} +SEXP wk_ulcer_index_batch(SEXP e, SEXP a0) { + struct UlcerIndex *h = (struct UlcerIndex *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_ulcer_index_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ulcer_index_reset(SEXP e) { + struct UlcerIndex *h = (struct UlcerIndex *)R_ExternalPtrAddr(e); + wickra_ulcer_index_reset(h); + return R_NilValue; +} + +static void ultimate_oscillator_fin(SEXP e) { + struct UltimateOscillator *h = (struct UltimateOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_ultimate_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_ultimate_oscillator_new(SEXP a0, SEXP a1, SEXP a2) { + struct UltimateOscillator *h = wickra_ultimate_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid UltimateOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, ultimate_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_ultimate_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UltimateOscillator *h = (struct UltimateOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_ultimate_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_ultimate_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UltimateOscillator *h = (struct UltimateOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_ultimate_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_ultimate_oscillator_reset(SEXP e) { + struct UltimateOscillator *h = (struct UltimateOscillator *)R_ExternalPtrAddr(e); + wickra_ultimate_oscillator_reset(h); + return R_NilValue; +} + +static void unique_three_river_fin(SEXP e) { + struct UniqueThreeRiver *h = (struct UniqueThreeRiver *)R_ExternalPtrAddr(e); + if (h) wickra_unique_three_river_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_unique_three_river_new(void) { + struct UniqueThreeRiver *h = wickra_unique_three_river_new(); + if (!h) Rf_error("invalid UniqueThreeRiver parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, unique_three_river_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_unique_three_river_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UniqueThreeRiver *h = (struct UniqueThreeRiver *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_unique_three_river_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_unique_three_river_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UniqueThreeRiver *h = (struct UniqueThreeRiver *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_unique_three_river_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_unique_three_river_reset(SEXP e) { + struct UniqueThreeRiver *h = (struct UniqueThreeRiver *)R_ExternalPtrAddr(e); + wickra_unique_three_river_reset(h); + return R_NilValue; +} + +static void universal_oscillator_fin(SEXP e) { + struct UniversalOscillator *h = (struct UniversalOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_universal_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_universal_oscillator_new(SEXP a0) { + struct UniversalOscillator *h = wickra_universal_oscillator_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid UniversalOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, universal_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_universal_oscillator_update(SEXP e, SEXP a0) { + struct UniversalOscillator *h = (struct UniversalOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_universal_oscillator_update(h, Rf_asReal(a0))); +} +SEXP wk_universal_oscillator_batch(SEXP e, SEXP a0) { + struct UniversalOscillator *h = (struct UniversalOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_universal_oscillator_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_universal_oscillator_reset(SEXP e) { + struct UniversalOscillator *h = (struct UniversalOscillator *)R_ExternalPtrAddr(e); + wickra_universal_oscillator_reset(h); + return R_NilValue; +} + +static void up_down_volume_ratio_fin(SEXP e) { + struct UpDownVolumeRatio *h = (struct UpDownVolumeRatio *)R_ExternalPtrAddr(e); + if (h) wickra_up_down_volume_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_up_down_volume_ratio_new(void) { + struct UpDownVolumeRatio *h = wickra_up_down_volume_ratio_new(); + if (!h) Rf_error("invalid UpDownVolumeRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, up_down_volume_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_up_down_volume_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP a6) { + struct UpDownVolumeRatio *h = (struct UpDownVolumeRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_up_down_volume_ratio_update(h, (double *)REAL(a0), (double *)REAL(a1), (bool *)REAL(a2), (bool *)REAL(a3), (bool *)REAL(a4), (bool *)REAL(a5), (uintptr_t)Rf_xlength(a0), (int64_t)Rf_asReal(a6))); +} +SEXP wk_up_down_volume_ratio_reset(SEXP e) { + struct UpDownVolumeRatio *h = (struct UpDownVolumeRatio *)R_ExternalPtrAddr(e); + wickra_up_down_volume_ratio_reset(h); + return R_NilValue; +} + +static void upside_gap_three_methods_fin(SEXP e) { + struct UpsideGapThreeMethods *h = (struct UpsideGapThreeMethods *)R_ExternalPtrAddr(e); + if (h) wickra_upside_gap_three_methods_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_upside_gap_three_methods_new(void) { + struct UpsideGapThreeMethods *h = wickra_upside_gap_three_methods_new(); + if (!h) Rf_error("invalid UpsideGapThreeMethods parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, upside_gap_three_methods_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_upside_gap_three_methods_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UpsideGapThreeMethods *h = (struct UpsideGapThreeMethods *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_upside_gap_three_methods_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_upside_gap_three_methods_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UpsideGapThreeMethods *h = (struct UpsideGapThreeMethods *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_upside_gap_three_methods_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_upside_gap_three_methods_reset(SEXP e) { + struct UpsideGapThreeMethods *h = (struct UpsideGapThreeMethods *)R_ExternalPtrAddr(e); + wickra_upside_gap_three_methods_reset(h); + return R_NilValue; +} + +static void upside_gap_two_crows_fin(SEXP e) { + struct UpsideGapTwoCrows *h = (struct UpsideGapTwoCrows *)R_ExternalPtrAddr(e); + if (h) wickra_upside_gap_two_crows_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_upside_gap_two_crows_new(void) { + struct UpsideGapTwoCrows *h = wickra_upside_gap_two_crows_new(); + if (!h) Rf_error("invalid UpsideGapTwoCrows parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, upside_gap_two_crows_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_upside_gap_two_crows_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UpsideGapTwoCrows *h = (struct UpsideGapTwoCrows *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_upside_gap_two_crows_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_upside_gap_two_crows_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct UpsideGapTwoCrows *h = (struct UpsideGapTwoCrows *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_upside_gap_two_crows_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_upside_gap_two_crows_reset(SEXP e) { + struct UpsideGapTwoCrows *h = (struct UpsideGapTwoCrows *)R_ExternalPtrAddr(e); + wickra_upside_gap_two_crows_reset(h); + return R_NilValue; +} + +static void upside_potential_ratio_fin(SEXP e) { + struct UpsidePotentialRatio *h = (struct UpsidePotentialRatio *)R_ExternalPtrAddr(e); + if (h) wickra_upside_potential_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_upside_potential_ratio_new(SEXP a0, SEXP a1) { + struct UpsidePotentialRatio *h = wickra_upside_potential_ratio_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid UpsidePotentialRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, upside_potential_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_upside_potential_ratio_update(SEXP e, SEXP a0) { + struct UpsidePotentialRatio *h = (struct UpsidePotentialRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_upside_potential_ratio_update(h, Rf_asReal(a0))); +} +SEXP wk_upside_potential_ratio_batch(SEXP e, SEXP a0) { + struct UpsidePotentialRatio *h = (struct UpsidePotentialRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_upside_potential_ratio_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_upside_potential_ratio_reset(SEXP e) { + struct UpsidePotentialRatio *h = (struct UpsidePotentialRatio *)R_ExternalPtrAddr(e); + wickra_upside_potential_ratio_reset(h); + return R_NilValue; +} + +static void value_area_fin(SEXP e) { + struct ValueArea *h = (struct ValueArea *)R_ExternalPtrAddr(e); + if (h) wickra_value_area_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_value_area_new(SEXP a0, SEXP a1, SEXP a2) { + struct ValueArea *h = wickra_value_area_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), Rf_asReal(a2)); + if (!h) Rf_error("invalid ValueArea parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, value_area_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_value_area_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ValueArea *h = (struct ValueArea *)R_ExternalPtrAddr(e); + struct WickraValueAreaOutput out; + int ok = wickra_value_area_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.poc : NA_REAL; + REAL(r)[1] = ok ? (double)out.vah : NA_REAL; + REAL(r)[2] = ok ? (double)out.val : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("poc")); + SET_STRING_ELT(nm, 1, Rf_mkChar("vah")); + SET_STRING_ELT(nm, 2, Rf_mkChar("val")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_value_area_reset(SEXP e) { + struct ValueArea *h = (struct ValueArea *)R_ExternalPtrAddr(e); + wickra_value_area_reset(h); + return R_NilValue; +} + +static void value_at_risk_fin(SEXP e) { + struct ValueAtRisk *h = (struct ValueAtRisk *)R_ExternalPtrAddr(e); + if (h) wickra_value_at_risk_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_value_at_risk_new(SEXP a0, SEXP a1) { + struct ValueAtRisk *h = wickra_value_at_risk_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid ValueAtRisk parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, value_at_risk_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_value_at_risk_update(SEXP e, SEXP a0) { + struct ValueAtRisk *h = (struct ValueAtRisk *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_value_at_risk_update(h, Rf_asReal(a0))); +} +SEXP wk_value_at_risk_batch(SEXP e, SEXP a0) { + struct ValueAtRisk *h = (struct ValueAtRisk *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_value_at_risk_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_value_at_risk_reset(SEXP e) { + struct ValueAtRisk *h = (struct ValueAtRisk *)R_ExternalPtrAddr(e); + wickra_value_at_risk_reset(h); + return R_NilValue; +} + +static void variance_fin(SEXP e) { + struct Variance *h = (struct Variance *)R_ExternalPtrAddr(e); + if (h) wickra_variance_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_variance_new(SEXP a0) { + struct Variance *h = wickra_variance_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Variance parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, variance_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_variance_update(SEXP e, SEXP a0) { + struct Variance *h = (struct Variance *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_variance_update(h, Rf_asReal(a0))); +} +SEXP wk_variance_batch(SEXP e, SEXP a0) { + struct Variance *h = (struct Variance *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_variance_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_variance_reset(SEXP e) { + struct Variance *h = (struct Variance *)R_ExternalPtrAddr(e); + wickra_variance_reset(h); + return R_NilValue; +} + +static void variance_ratio_fin(SEXP e) { + struct VarianceRatio *h = (struct VarianceRatio *)R_ExternalPtrAddr(e); + if (h) wickra_variance_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_variance_ratio_new(SEXP a0, SEXP a1) { + struct VarianceRatio *h = wickra_variance_ratio_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid VarianceRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, variance_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_variance_ratio_update(SEXP e, SEXP a0, SEXP a1) { + struct VarianceRatio *h = (struct VarianceRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_variance_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1))); +} +SEXP wk_variance_ratio_batch(SEXP e, SEXP a0, SEXP a1) { + struct VarianceRatio *h = (struct VarianceRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_variance_ratio_batch(h, REAL(a0), REAL(a1), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_variance_ratio_reset(SEXP e) { + struct VarianceRatio *h = (struct VarianceRatio *)R_ExternalPtrAddr(e); + wickra_variance_ratio_reset(h); + return R_NilValue; +} + +static void vertical_horizontal_filter_fin(SEXP e) { + struct VerticalHorizontalFilter *h = (struct VerticalHorizontalFilter *)R_ExternalPtrAddr(e); + if (h) wickra_vertical_horizontal_filter_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vertical_horizontal_filter_new(SEXP a0) { + struct VerticalHorizontalFilter *h = wickra_vertical_horizontal_filter_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid VerticalHorizontalFilter parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vertical_horizontal_filter_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vertical_horizontal_filter_update(SEXP e, SEXP a0) { + struct VerticalHorizontalFilter *h = (struct VerticalHorizontalFilter *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vertical_horizontal_filter_update(h, Rf_asReal(a0))); +} +SEXP wk_vertical_horizontal_filter_batch(SEXP e, SEXP a0) { + struct VerticalHorizontalFilter *h = (struct VerticalHorizontalFilter *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_vertical_horizontal_filter_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_vertical_horizontal_filter_reset(SEXP e) { + struct VerticalHorizontalFilter *h = (struct VerticalHorizontalFilter *)R_ExternalPtrAddr(e); + wickra_vertical_horizontal_filter_reset(h); + return R_NilValue; +} + +static void vidya_fin(SEXP e) { + struct Vidya *h = (struct Vidya *)R_ExternalPtrAddr(e); + if (h) wickra_vidya_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vidya_new(SEXP a0, SEXP a1) { + struct Vidya *h = wickra_vidya_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Vidya parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vidya_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vidya_update(SEXP e, SEXP a0) { + struct Vidya *h = (struct Vidya *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vidya_update(h, Rf_asReal(a0))); +} +SEXP wk_vidya_batch(SEXP e, SEXP a0) { + struct Vidya *h = (struct Vidya *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_vidya_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_vidya_reset(SEXP e) { + struct Vidya *h = (struct Vidya *)R_ExternalPtrAddr(e); + wickra_vidya_reset(h); + return R_NilValue; +} + +static void volatility_cone_fin(SEXP e) { + struct VolatilityCone *h = (struct VolatilityCone *)R_ExternalPtrAddr(e); + if (h) wickra_volatility_cone_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volatility_cone_new(SEXP a0, SEXP a1) { + struct VolatilityCone *h = wickra_volatility_cone_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid VolatilityCone parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volatility_cone_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volatility_cone_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolatilityCone *h = (struct VolatilityCone *)R_ExternalPtrAddr(e); + struct WickraVolatilityConeOutput out; + int ok = wickra_volatility_cone_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.current : NA_REAL; + REAL(r)[1] = ok ? (double)out.min : NA_REAL; + REAL(r)[2] = ok ? (double)out.median : NA_REAL; + REAL(r)[3] = ok ? (double)out.max : NA_REAL; + REAL(r)[4] = ok ? (double)out.percentile : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("current")); + SET_STRING_ELT(nm, 1, Rf_mkChar("min")); + SET_STRING_ELT(nm, 2, Rf_mkChar("median")); + SET_STRING_ELT(nm, 3, Rf_mkChar("max")); + SET_STRING_ELT(nm, 4, Rf_mkChar("percentile")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_volatility_cone_reset(SEXP e) { + struct VolatilityCone *h = (struct VolatilityCone *)R_ExternalPtrAddr(e); + wickra_volatility_cone_reset(h); + return R_NilValue; +} + +static void volatility_of_volatility_fin(SEXP e) { + struct VolatilityOfVolatility *h = (struct VolatilityOfVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_volatility_of_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volatility_of_volatility_new(SEXP a0, SEXP a1) { + struct VolatilityOfVolatility *h = wickra_volatility_of_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid VolatilityOfVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volatility_of_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volatility_of_volatility_update(SEXP e, SEXP a0) { + struct VolatilityOfVolatility *h = (struct VolatilityOfVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volatility_of_volatility_update(h, Rf_asReal(a0))); +} +SEXP wk_volatility_of_volatility_batch(SEXP e, SEXP a0) { + struct VolatilityOfVolatility *h = (struct VolatilityOfVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_volatility_of_volatility_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volatility_of_volatility_reset(SEXP e) { + struct VolatilityOfVolatility *h = (struct VolatilityOfVolatility *)R_ExternalPtrAddr(e); + wickra_volatility_of_volatility_reset(h); + return R_NilValue; +} + +static void volatility_ratio_fin(SEXP e) { + struct VolatilityRatio *h = (struct VolatilityRatio *)R_ExternalPtrAddr(e); + if (h) wickra_volatility_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volatility_ratio_new(SEXP a0) { + struct VolatilityRatio *h = wickra_volatility_ratio_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid VolatilityRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volatility_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volatility_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolatilityRatio *h = (struct VolatilityRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volatility_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_volatility_ratio_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolatilityRatio *h = (struct VolatilityRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_volatility_ratio_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volatility_ratio_reset(SEXP e) { + struct VolatilityRatio *h = (struct VolatilityRatio *)R_ExternalPtrAddr(e); + wickra_volatility_ratio_reset(h); + return R_NilValue; +} + +static void volty_stop_fin(SEXP e) { + struct VoltyStop *h = (struct VoltyStop *)R_ExternalPtrAddr(e); + if (h) wickra_volty_stop_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volty_stop_new(SEXP a0, SEXP a1) { + struct VoltyStop *h = wickra_volty_stop_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid VoltyStop parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volty_stop_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volty_stop_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VoltyStop *h = (struct VoltyStop *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volty_stop_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_volty_stop_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VoltyStop *h = (struct VoltyStop *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_volty_stop_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volty_stop_reset(SEXP e) { + struct VoltyStop *h = (struct VoltyStop *)R_ExternalPtrAddr(e); + wickra_volty_stop_reset(h); + return R_NilValue; +} + +static void volume_bars_fin(SEXP e) { + struct VolumeBars *h = (struct VolumeBars *)R_ExternalPtrAddr(e); + if (h) wickra_volume_bars_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_bars_new(SEXP a0) { + struct VolumeBars *h = wickra_volume_bars_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid VolumeBars parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_bars_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_bars_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeBars *h = (struct VolumeBars *)R_ExternalPtrAddr(e); + struct WickraVolumeBar buf[64]; + size_t n = wickra_volume_bars_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), buf, 64); + SEXP r = PROTECT(Rf_allocMatrix(REALSXP, (int)n, 5)); + for (size_t i = 0; i < n; i++) { + REAL(r)[i + n * 0] = (double)buf[i].open; + REAL(r)[i + n * 1] = (double)buf[i].high; + REAL(r)[i + n * 2] = (double)buf[i].low; + REAL(r)[i + n * 3] = (double)buf[i].close; + REAL(r)[i + n * 4] = (double)buf[i].volume; + } + SEXP cn = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(cn, 0, Rf_mkChar("open")); + SET_STRING_ELT(cn, 1, Rf_mkChar("high")); + SET_STRING_ELT(cn, 2, Rf_mkChar("low")); + SET_STRING_ELT(cn, 3, Rf_mkChar("close")); + SET_STRING_ELT(cn, 4, Rf_mkChar("volume")); + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dn, 1, cn); + Rf_setAttrib(r, R_DimNamesSymbol, dn); + UNPROTECT(3); + return r; +} +SEXP wk_volume_bars_reset(SEXP e) { + struct VolumeBars *h = (struct VolumeBars *)R_ExternalPtrAddr(e); + wickra_volume_bars_reset(h); + return R_NilValue; +} + +static void volume_by_time_profile_fin(SEXP e) { + struct VolumeByTimeProfile *h = (struct VolumeByTimeProfile *)R_ExternalPtrAddr(e); + if (h) wickra_volume_by_time_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_by_time_profile_new(SEXP a0, SEXP a1) { + struct VolumeByTimeProfile *h = wickra_volume_by_time_profile_new((uintptr_t)Rf_asReal(a0), (int32_t)Rf_asInteger(a1)); + if (!h) Rf_error("invalid VolumeByTimeProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_by_time_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_by_time_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct VolumeByTimeProfile *h = (struct VolumeByTimeProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + R_xlen_t n = wickra_volume_by_time_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + UNPROTECT(2); + return vv; +} +SEXP wk_volume_by_time_profile_reset(SEXP e) { + struct VolumeByTimeProfile *h = (struct VolumeByTimeProfile *)R_ExternalPtrAddr(e); + wickra_volume_by_time_profile_reset(h); + return R_NilValue; +} + +static void volume_oscillator_fin(SEXP e) { + struct VolumeOscillator *h = (struct VolumeOscillator *)R_ExternalPtrAddr(e); + if (h) wickra_volume_oscillator_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_oscillator_new(SEXP a0, SEXP a1) { + struct VolumeOscillator *h = wickra_volume_oscillator_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid VolumeOscillator parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_oscillator_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_oscillator_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeOscillator *h = (struct VolumeOscillator *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volume_oscillator_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_volume_oscillator_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeOscillator *h = (struct VolumeOscillator *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_volume_oscillator_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volume_oscillator_reset(SEXP e) { + struct VolumeOscillator *h = (struct VolumeOscillator *)R_ExternalPtrAddr(e); + wickra_volume_oscillator_reset(h); + return R_NilValue; +} + +static void volume_price_trend_fin(SEXP e) { + struct VolumePriceTrend *h = (struct VolumePriceTrend *)R_ExternalPtrAddr(e); + if (h) wickra_volume_price_trend_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_price_trend_new(void) { + struct VolumePriceTrend *h = wickra_volume_price_trend_new(); + if (!h) Rf_error("invalid VolumePriceTrend parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_price_trend_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_price_trend_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumePriceTrend *h = (struct VolumePriceTrend *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volume_price_trend_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_volume_price_trend_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumePriceTrend *h = (struct VolumePriceTrend *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_volume_price_trend_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volume_price_trend_reset(SEXP e) { + struct VolumePriceTrend *h = (struct VolumePriceTrend *)R_ExternalPtrAddr(e); + wickra_volume_price_trend_reset(h); + return R_NilValue; +} + +static void volume_profile_fin(SEXP e) { + struct VolumeProfile *h = (struct VolumeProfile *)R_ExternalPtrAddr(e); + if (h) wickra_volume_profile_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_profile_new(SEXP a0, SEXP a1) { + struct VolumeProfile *h = wickra_volume_profile_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid VolumeProfile parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_profile_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_profile_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5, SEXP capn) { + struct VolumeProfile *h = (struct VolumeProfile *)R_ExternalPtrAddr(e); + int cap = Rf_asInteger(capn); + SEXP values = PROTECT(Rf_allocVector(REALSXP, cap)); + struct WickraVolumeProfileOutputScalars sc; + R_xlen_t n = wickra_volume_profile_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &sc, REAL(values), (uintptr_t)cap); + if (n < 0) { UNPROTECT(1); return R_NilValue; } + SEXP out = PROTECT(Rf_allocVector(VECSXP, 3)); + SEXP onm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_VECTOR_ELT(out, 0, Rf_ScalarReal((double)sc.price_low)); + SET_STRING_ELT(onm, 0, Rf_mkChar("price_low")); + SET_VECTOR_ELT(out, 1, Rf_ScalarReal((double)sc.price_high)); + SET_STRING_ELT(onm, 1, Rf_mkChar("price_high")); + SEXP vv = PROTECT(Rf_allocVector(REALSXP, n)); + for (R_xlen_t i = 0; i < n; i++) REAL(vv)[i] = REAL(values)[i]; + SET_VECTOR_ELT(out, 2, vv); + SET_STRING_ELT(onm, 2, Rf_mkChar("values")); + Rf_setAttrib(out, R_NamesSymbol, onm); + UNPROTECT(4); + return out; +} +SEXP wk_volume_profile_reset(SEXP e) { + struct VolumeProfile *h = (struct VolumeProfile *)R_ExternalPtrAddr(e); + wickra_volume_profile_reset(h); + return R_NilValue; +} + +static void volume_rsi_fin(SEXP e) { + struct VolumeRsi *h = (struct VolumeRsi *)R_ExternalPtrAddr(e); + if (h) wickra_volume_rsi_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_rsi_new(SEXP a0) { + struct VolumeRsi *h = wickra_volume_rsi_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid VolumeRsi parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_rsi_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_rsi_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeRsi *h = (struct VolumeRsi *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_volume_rsi_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_volume_rsi_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeRsi *h = (struct VolumeRsi *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_volume_rsi_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_volume_rsi_reset(SEXP e) { + struct VolumeRsi *h = (struct VolumeRsi *)R_ExternalPtrAddr(e); + wickra_volume_rsi_reset(h); + return R_NilValue; +} + +static void volume_weighted_macd_fin(SEXP e) { + struct VolumeWeightedMacd *h = (struct VolumeWeightedMacd *)R_ExternalPtrAddr(e); + if (h) wickra_volume_weighted_macd_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_weighted_macd_new(SEXP a0, SEXP a1, SEXP a2) { + struct VolumeWeightedMacd *h = wickra_volume_weighted_macd_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid VolumeWeightedMacd parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_weighted_macd_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_weighted_macd_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeWeightedMacd *h = (struct VolumeWeightedMacd *)R_ExternalPtrAddr(e); + struct WickraVolumeWeightedMacdOutput out; + int ok = wickra_volume_weighted_macd_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.macd : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + REAL(r)[2] = ok ? (double)out.histogram : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("macd")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + SET_STRING_ELT(nm, 2, Rf_mkChar("histogram")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_volume_weighted_macd_reset(SEXP e) { + struct VolumeWeightedMacd *h = (struct VolumeWeightedMacd *)R_ExternalPtrAddr(e); + wickra_volume_weighted_macd_reset(h); + return R_NilValue; +} + +static void volume_weighted_sr_fin(SEXP e) { + struct VolumeWeightedSr *h = (struct VolumeWeightedSr *)R_ExternalPtrAddr(e); + if (h) wickra_volume_weighted_sr_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_volume_weighted_sr_new(SEXP a0) { + struct VolumeWeightedSr *h = wickra_volume_weighted_sr_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid VolumeWeightedSr parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, volume_weighted_sr_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_volume_weighted_sr_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VolumeWeightedSr *h = (struct VolumeWeightedSr *)R_ExternalPtrAddr(e); + struct WickraVolumeWeightedSrOutput out; + int ok = wickra_volume_weighted_sr_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.support : NA_REAL; + REAL(r)[1] = ok ? (double)out.resistance : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("support")); + SET_STRING_ELT(nm, 1, Rf_mkChar("resistance")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_volume_weighted_sr_reset(SEXP e) { + struct VolumeWeightedSr *h = (struct VolumeWeightedSr *)R_ExternalPtrAddr(e); + wickra_volume_weighted_sr_reset(h); + return R_NilValue; +} + +static void vortex_fin(SEXP e) { + struct Vortex *h = (struct Vortex *)R_ExternalPtrAddr(e); + if (h) wickra_vortex_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vortex_new(SEXP a0) { + struct Vortex *h = wickra_vortex_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Vortex parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vortex_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vortex_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vortex *h = (struct Vortex *)R_ExternalPtrAddr(e); + struct WickraVortexOutput out; + int ok = wickra_vortex_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.plus : NA_REAL; + REAL(r)[1] = ok ? (double)out.minus : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("plus")); + SET_STRING_ELT(nm, 1, Rf_mkChar("minus")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_vortex_reset(SEXP e) { + struct Vortex *h = (struct Vortex *)R_ExternalPtrAddr(e); + wickra_vortex_reset(h); + return R_NilValue; +} + +static void vpin_fin(SEXP e) { + struct Vpin *h = (struct Vpin *)R_ExternalPtrAddr(e); + if (h) wickra_vpin_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vpin_new(SEXP a0, SEXP a1) { + struct Vpin *h = wickra_vpin_new(Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid Vpin parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vpin_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vpin_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3) { + struct Vpin *h = (struct Vpin *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vpin_update(h, Rf_asReal(a0), Rf_asReal(a1), (bool)(Rf_asLogical(a2) == TRUE), (int64_t)Rf_asReal(a3))); +} +SEXP wk_vpin_reset(SEXP e) { + struct Vpin *h = (struct Vpin *)R_ExternalPtrAddr(e); + wickra_vpin_reset(h); + return R_NilValue; +} + +static void vwap_fin(SEXP e) { + struct Vwap *h = (struct Vwap *)R_ExternalPtrAddr(e); + if (h) wickra_vwap_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vwap_new(void) { + struct Vwap *h = wickra_vwap_new(); + if (!h) Rf_error("invalid Vwap parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vwap_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vwap_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vwap *h = (struct Vwap *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vwap_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_vwap_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vwap *h = (struct Vwap *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_vwap_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_vwap_reset(SEXP e) { + struct Vwap *h = (struct Vwap *)R_ExternalPtrAddr(e); + wickra_vwap_reset(h); + return R_NilValue; +} + +static void vwap_std_dev_bands_fin(SEXP e) { + struct VwapStdDevBands *h = (struct VwapStdDevBands *)R_ExternalPtrAddr(e); + if (h) wickra_vwap_std_dev_bands_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vwap_std_dev_bands_new(SEXP a0) { + struct VwapStdDevBands *h = wickra_vwap_std_dev_bands_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid VwapStdDevBands parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vwap_std_dev_bands_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vwap_std_dev_bands_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct VwapStdDevBands *h = (struct VwapStdDevBands *)R_ExternalPtrAddr(e); + struct WickraVwapStdDevBandsOutput out; + int ok = wickra_vwap_std_dev_bands_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 4)); + REAL(r)[0] = ok ? (double)out.upper : NA_REAL; + REAL(r)[1] = ok ? (double)out.middle : NA_REAL; + REAL(r)[2] = ok ? (double)out.lower : NA_REAL; + REAL(r)[3] = ok ? (double)out.stddev : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(nm, 0, Rf_mkChar("upper")); + SET_STRING_ELT(nm, 1, Rf_mkChar("middle")); + SET_STRING_ELT(nm, 2, Rf_mkChar("lower")); + SET_STRING_ELT(nm, 3, Rf_mkChar("stddev")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_vwap_std_dev_bands_reset(SEXP e) { + struct VwapStdDevBands *h = (struct VwapStdDevBands *)R_ExternalPtrAddr(e); + wickra_vwap_std_dev_bands_reset(h); + return R_NilValue; +} + +static void vwma_fin(SEXP e) { + struct Vwma *h = (struct Vwma *)R_ExternalPtrAddr(e); + if (h) wickra_vwma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vwma_new(SEXP a0) { + struct Vwma *h = wickra_vwma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Vwma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vwma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vwma_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vwma *h = (struct Vwma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vwma_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_vwma_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vwma *h = (struct Vwma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_vwma_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_vwma_reset(SEXP e) { + struct Vwma *h = (struct Vwma *)R_ExternalPtrAddr(e); + wickra_vwma_reset(h); + return R_NilValue; +} + +static void vzo_fin(SEXP e) { + struct Vzo *h = (struct Vzo *)R_ExternalPtrAddr(e); + if (h) wickra_vzo_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_vzo_new(SEXP a0) { + struct Vzo *h = wickra_vzo_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Vzo parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, vzo_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_vzo_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vzo *h = (struct Vzo *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_vzo_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_vzo_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Vzo *h = (struct Vzo *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_vzo_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_vzo_reset(SEXP e) { + struct Vzo *h = (struct Vzo *)R_ExternalPtrAddr(e); + wickra_vzo_reset(h); + return R_NilValue; +} + +static void wad_fin(SEXP e) { + struct Wad *h = (struct Wad *)R_ExternalPtrAddr(e); + if (h) wickra_wad_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wad_new(void) { + struct Wad *h = wickra_wad_new(); + if (!h) Rf_error("invalid Wad parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wad_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wad_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Wad *h = (struct Wad *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_wad_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_wad_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Wad *h = (struct Wad *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_wad_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_wad_reset(SEXP e) { + struct Wad *h = (struct Wad *)R_ExternalPtrAddr(e); + wickra_wad_reset(h); + return R_NilValue; +} + +static void wave_pm_fin(SEXP e) { + struct WavePm *h = (struct WavePm *)R_ExternalPtrAddr(e); + if (h) wickra_wave_pm_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wave_pm_new(SEXP a0, SEXP a1) { + struct WavePm *h = wickra_wave_pm_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid WavePm parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wave_pm_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wave_pm_update(SEXP e, SEXP a0) { + struct WavePm *h = (struct WavePm *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_wave_pm_update(h, Rf_asReal(a0))); +} +SEXP wk_wave_pm_batch(SEXP e, SEXP a0) { + struct WavePm *h = (struct WavePm *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_wave_pm_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_wave_pm_reset(SEXP e) { + struct WavePm *h = (struct WavePm *)R_ExternalPtrAddr(e); + wickra_wave_pm_reset(h); + return R_NilValue; +} + +static void wave_trend_fin(SEXP e) { + struct WaveTrend *h = (struct WaveTrend *)R_ExternalPtrAddr(e); + if (h) wickra_wave_trend_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wave_trend_new(SEXP a0, SEXP a1, SEXP a2) { + struct WaveTrend *h = wickra_wave_trend_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid WaveTrend parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wave_trend_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wave_trend_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WaveTrend *h = (struct WaveTrend *)R_ExternalPtrAddr(e); + struct WickraWaveTrendOutput out; + int ok = wickra_wave_trend_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.wt1 : NA_REAL; + REAL(r)[1] = ok ? (double)out.wt2 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("wt1")); + SET_STRING_ELT(nm, 1, Rf_mkChar("wt2")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_wave_trend_reset(SEXP e) { + struct WaveTrend *h = (struct WaveTrend *)R_ExternalPtrAddr(e); + wickra_wave_trend_reset(h); + return R_NilValue; +} + +static void wedge_fin(SEXP e) { + struct Wedge *h = (struct Wedge *)R_ExternalPtrAddr(e); + if (h) wickra_wedge_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wedge_new(void) { + struct Wedge *h = wickra_wedge_new(); + if (!h) Rf_error("invalid Wedge parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wedge_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wedge_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Wedge *h = (struct Wedge *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_wedge_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_wedge_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct Wedge *h = (struct Wedge *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_wedge_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_wedge_reset(SEXP e) { + struct Wedge *h = (struct Wedge *)R_ExternalPtrAddr(e); + wickra_wedge_reset(h); + return R_NilValue; +} + +static void weighted_close_fin(SEXP e) { + struct WeightedClose *h = (struct WeightedClose *)R_ExternalPtrAddr(e); + if (h) wickra_weighted_close_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_weighted_close_new(void) { + struct WeightedClose *h = wickra_weighted_close_new(); + if (!h) Rf_error("invalid WeightedClose parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, weighted_close_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_weighted_close_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WeightedClose *h = (struct WeightedClose *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_weighted_close_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_weighted_close_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WeightedClose *h = (struct WeightedClose *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_weighted_close_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_weighted_close_reset(SEXP e) { + struct WeightedClose *h = (struct WeightedClose *)R_ExternalPtrAddr(e); + wickra_weighted_close_reset(h); + return R_NilValue; +} + +static void wick_ratio_fin(SEXP e) { + struct WickRatio *h = (struct WickRatio *)R_ExternalPtrAddr(e); + if (h) wickra_wick_ratio_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wick_ratio_new(void) { + struct WickRatio *h = wickra_wick_ratio_new(); + if (!h) Rf_error("invalid WickRatio parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wick_ratio_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wick_ratio_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WickRatio *h = (struct WickRatio *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_wick_ratio_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_wick_ratio_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WickRatio *h = (struct WickRatio *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_wick_ratio_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_wick_ratio_reset(SEXP e) { + struct WickRatio *h = (struct WickRatio *)R_ExternalPtrAddr(e); + wickra_wick_ratio_reset(h); + return R_NilValue; +} + +static void williams_fractals_fin(SEXP e) { + struct WilliamsFractals *h = (struct WilliamsFractals *)R_ExternalPtrAddr(e); + if (h) wickra_williams_fractals_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_williams_fractals_new(void) { + struct WilliamsFractals *h = wickra_williams_fractals_new(); + if (!h) Rf_error("invalid WilliamsFractals parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, williams_fractals_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_williams_fractals_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WilliamsFractals *h = (struct WilliamsFractals *)R_ExternalPtrAddr(e); + struct WickraWilliamsFractalsOutput out; + int ok = wickra_williams_fractals_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.up : NA_REAL; + REAL(r)[1] = ok ? (double)out.down : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("up")); + SET_STRING_ELT(nm, 1, Rf_mkChar("down")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_williams_fractals_reset(SEXP e) { + struct WilliamsFractals *h = (struct WilliamsFractals *)R_ExternalPtrAddr(e); + wickra_williams_fractals_reset(h); + return R_NilValue; +} + +static void williams_r_fin(SEXP e) { + struct WilliamsR *h = (struct WilliamsR *)R_ExternalPtrAddr(e); + if (h) wickra_williams_r_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_williams_r_new(SEXP a0) { + struct WilliamsR *h = wickra_williams_r_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid WilliamsR parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, williams_r_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_williams_r_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WilliamsR *h = (struct WilliamsR *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_williams_r_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_williams_r_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WilliamsR *h = (struct WilliamsR *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_williams_r_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_williams_r_reset(SEXP e) { + struct WilliamsR *h = (struct WilliamsR *)R_ExternalPtrAddr(e); + wickra_williams_r_reset(h); + return R_NilValue; +} + +static void win_rate_fin(SEXP e) { + struct WinRate *h = (struct WinRate *)R_ExternalPtrAddr(e); + if (h) wickra_win_rate_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_win_rate_new(SEXP a0) { + struct WinRate *h = wickra_win_rate_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid WinRate parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, win_rate_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_win_rate_update(SEXP e, SEXP a0) { + struct WinRate *h = (struct WinRate *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_win_rate_update(h, Rf_asReal(a0))); +} +SEXP wk_win_rate_batch(SEXP e, SEXP a0) { + struct WinRate *h = (struct WinRate *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_win_rate_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_win_rate_reset(SEXP e) { + struct WinRate *h = (struct WinRate *)R_ExternalPtrAddr(e); + wickra_win_rate_reset(h); + return R_NilValue; +} + +static void wma_fin(SEXP e) { + struct Wma *h = (struct Wma *)R_ExternalPtrAddr(e); + if (h) wickra_wma_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_wma_new(SEXP a0) { + struct Wma *h = wickra_wma_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Wma parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, wma_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_wma_update(SEXP e, SEXP a0) { + struct Wma *h = (struct Wma *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_wma_update(h, Rf_asReal(a0))); +} +SEXP wk_wma_batch(SEXP e, SEXP a0) { + struct Wma *h = (struct Wma *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_wma_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_wma_reset(SEXP e) { + struct Wma *h = (struct Wma *)R_ExternalPtrAddr(e); + wickra_wma_reset(h); + return R_NilValue; +} + +static void woodie_pivots_fin(SEXP e) { + struct WoodiePivots *h = (struct WoodiePivots *)R_ExternalPtrAddr(e); + if (h) wickra_woodie_pivots_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_woodie_pivots_new(void) { + struct WoodiePivots *h = wickra_woodie_pivots_new(); + if (!h) Rf_error("invalid WoodiePivots parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, woodie_pivots_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_woodie_pivots_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct WoodiePivots *h = (struct WoodiePivots *)R_ExternalPtrAddr(e); + struct WickraWoodiePivotsOutput out; + int ok = wickra_woodie_pivots_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 5)); + REAL(r)[0] = ok ? (double)out.pp : NA_REAL; + REAL(r)[1] = ok ? (double)out.r1 : NA_REAL; + REAL(r)[2] = ok ? (double)out.r2 : NA_REAL; + REAL(r)[3] = ok ? (double)out.s1 : NA_REAL; + REAL(r)[4] = ok ? (double)out.s2 : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(nm, 0, Rf_mkChar("pp")); + SET_STRING_ELT(nm, 1, Rf_mkChar("r1")); + SET_STRING_ELT(nm, 2, Rf_mkChar("r2")); + SET_STRING_ELT(nm, 3, Rf_mkChar("s1")); + SET_STRING_ELT(nm, 4, Rf_mkChar("s2")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_woodie_pivots_reset(SEXP e) { + struct WoodiePivots *h = (struct WoodiePivots *)R_ExternalPtrAddr(e); + wickra_woodie_pivots_reset(h); + return R_NilValue; +} + +static void yang_zhang_volatility_fin(SEXP e) { + struct YangZhangVolatility *h = (struct YangZhangVolatility *)R_ExternalPtrAddr(e); + if (h) wickra_yang_zhang_volatility_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_yang_zhang_volatility_new(SEXP a0, SEXP a1) { + struct YangZhangVolatility *h = wickra_yang_zhang_volatility_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1)); + if (!h) Rf_error("invalid YangZhangVolatility parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, yang_zhang_volatility_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_yang_zhang_volatility_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct YangZhangVolatility *h = (struct YangZhangVolatility *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_yang_zhang_volatility_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_yang_zhang_volatility_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct YangZhangVolatility *h = (struct YangZhangVolatility *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_yang_zhang_volatility_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_yang_zhang_volatility_reset(SEXP e) { + struct YangZhangVolatility *h = (struct YangZhangVolatility *)R_ExternalPtrAddr(e); + wickra_yang_zhang_volatility_reset(h); + return R_NilValue; +} + +static void yoyo_exit_fin(SEXP e) { + struct YoyoExit *h = (struct YoyoExit *)R_ExternalPtrAddr(e); + if (h) wickra_yoyo_exit_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_yoyo_exit_new(SEXP a0, SEXP a1) { + struct YoyoExit *h = wickra_yoyo_exit_new((uintptr_t)Rf_asReal(a0), Rf_asReal(a1)); + if (!h) Rf_error("invalid YoyoExit parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, yoyo_exit_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_yoyo_exit_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct YoyoExit *h = (struct YoyoExit *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_yoyo_exit_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5))); +} +SEXP wk_yoyo_exit_batch(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct YoyoExit *h = (struct YoyoExit *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + int64_t *b5 = (int64_t *)R_alloc(n, sizeof(int64_t)); + for (R_xlen_t k = 0; k < n; k++) b5[k] = (int64_t)REAL(a5)[k]; + wickra_yoyo_exit_batch(h, REAL(a0), REAL(a1), REAL(a2), REAL(a3), REAL(a4), b5, REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_yoyo_exit_reset(SEXP e) { + struct YoyoExit *h = (struct YoyoExit *)R_ExternalPtrAddr(e); + wickra_yoyo_exit_reset(h); + return R_NilValue; +} + +static void z_score_fin(SEXP e) { + struct ZScore *h = (struct ZScore *)R_ExternalPtrAddr(e); + if (h) wickra_z_score_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_z_score_new(SEXP a0) { + struct ZScore *h = wickra_z_score_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid ZScore parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, z_score_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_z_score_update(SEXP e, SEXP a0) { + struct ZScore *h = (struct ZScore *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_z_score_update(h, Rf_asReal(a0))); +} +SEXP wk_z_score_batch(SEXP e, SEXP a0) { + struct ZScore *h = (struct ZScore *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_z_score_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_z_score_reset(SEXP e) { + struct ZScore *h = (struct ZScore *)R_ExternalPtrAddr(e); + wickra_z_score_reset(h); + return R_NilValue; +} + +static void zero_lag_macd_fin(SEXP e) { + struct ZeroLagMacd *h = (struct ZeroLagMacd *)R_ExternalPtrAddr(e); + if (h) wickra_zero_lag_macd_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_zero_lag_macd_new(SEXP a0, SEXP a1, SEXP a2) { + struct ZeroLagMacd *h = wickra_zero_lag_macd_new((uintptr_t)Rf_asReal(a0), (uintptr_t)Rf_asReal(a1), (uintptr_t)Rf_asReal(a2)); + if (!h) Rf_error("invalid ZeroLagMacd parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, zero_lag_macd_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_zero_lag_macd_update(SEXP e, SEXP a0) { + struct ZeroLagMacd *h = (struct ZeroLagMacd *)R_ExternalPtrAddr(e); + struct WickraZeroLagMacdOutput out; + int ok = wickra_zero_lag_macd_update(h, Rf_asReal(a0), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 3)); + REAL(r)[0] = ok ? (double)out.macd : NA_REAL; + REAL(r)[1] = ok ? (double)out.signal : NA_REAL; + REAL(r)[2] = ok ? (double)out.histogram : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(nm, 0, Rf_mkChar("macd")); + SET_STRING_ELT(nm, 1, Rf_mkChar("signal")); + SET_STRING_ELT(nm, 2, Rf_mkChar("histogram")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_zero_lag_macd_reset(SEXP e) { + struct ZeroLagMacd *h = (struct ZeroLagMacd *)R_ExternalPtrAddr(e); + wickra_zero_lag_macd_reset(h); + return R_NilValue; +} + +static void zig_zag_fin(SEXP e) { + struct ZigZag *h = (struct ZigZag *)R_ExternalPtrAddr(e); + if (h) wickra_zig_zag_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_zig_zag_new(SEXP a0) { + struct ZigZag *h = wickra_zig_zag_new(Rf_asReal(a0)); + if (!h) Rf_error("invalid ZigZag parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, zig_zag_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_zig_zag_update(SEXP e, SEXP a0, SEXP a1, SEXP a2, SEXP a3, SEXP a4, SEXP a5) { + struct ZigZag *h = (struct ZigZag *)R_ExternalPtrAddr(e); + struct WickraZigZagOutput out; + int ok = wickra_zig_zag_update(h, Rf_asReal(a0), Rf_asReal(a1), Rf_asReal(a2), Rf_asReal(a3), Rf_asReal(a4), (int64_t)Rf_asReal(a5), &out); + SEXP r = PROTECT(Rf_allocVector(REALSXP, 2)); + REAL(r)[0] = ok ? (double)out.swing : NA_REAL; + REAL(r)[1] = ok ? (double)out.direction : NA_REAL; + SEXP nm = PROTECT(Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(nm, 0, Rf_mkChar("swing")); + SET_STRING_ELT(nm, 1, Rf_mkChar("direction")); + Rf_setAttrib(r, R_NamesSymbol, nm); + UNPROTECT(2); + return r; +} +SEXP wk_zig_zag_reset(SEXP e) { + struct ZigZag *h = (struct ZigZag *)R_ExternalPtrAddr(e); + wickra_zig_zag_reset(h); + return R_NilValue; +} + +static void zlema_fin(SEXP e) { + struct Zlema *h = (struct Zlema *)R_ExternalPtrAddr(e); + if (h) wickra_zlema_free(h); + R_ClearExternalPtr(e); +} +SEXP wk_zlema_new(SEXP a0) { + struct Zlema *h = wickra_zlema_new((uintptr_t)Rf_asReal(a0)); + if (!h) Rf_error("invalid Zlema parameters"); + SEXP e = PROTECT(R_MakeExternalPtr(h, R_NilValue, R_NilValue)); + R_RegisterCFinalizerEx(e, zlema_fin, TRUE); + UNPROTECT(1); + return e; +} +SEXP wk_zlema_update(SEXP e, SEXP a0) { + struct Zlema *h = (struct Zlema *)R_ExternalPtrAddr(e); + return Rf_ScalarReal(wickra_zlema_update(h, Rf_asReal(a0))); +} +SEXP wk_zlema_batch(SEXP e, SEXP a0) { + struct Zlema *h = (struct Zlema *)R_ExternalPtrAddr(e); + R_xlen_t n = Rf_xlength(a0); + SEXP out = PROTECT(Rf_allocVector(REALSXP, n)); + wickra_zlema_batch(h, REAL(a0), REAL(out), (uintptr_t)n); + UNPROTECT(1); + return out; +} +SEXP wk_zlema_reset(SEXP e) { + struct Zlema *h = (struct Zlema *)R_ExternalPtrAddr(e); + wickra_zlema_reset(h); + return R_NilValue; +} + +static const R_CallMethodDef CallEntries[] = { + {"wk_abandoned_baby_new", (DL_FUNC)&wk_abandoned_baby_new, 0}, + {"wk_abandoned_baby_update", (DL_FUNC)&wk_abandoned_baby_update, 7}, + {"wk_abandoned_baby_batch", (DL_FUNC)&wk_abandoned_baby_batch, 7}, + {"wk_abandoned_baby_reset", (DL_FUNC)&wk_abandoned_baby_reset, 1}, + {"wk_abcd_new", (DL_FUNC)&wk_abcd_new, 0}, + {"wk_abcd_update", (DL_FUNC)&wk_abcd_update, 7}, + {"wk_abcd_batch", (DL_FUNC)&wk_abcd_batch, 7}, + {"wk_abcd_reset", (DL_FUNC)&wk_abcd_reset, 1}, + {"wk_absolute_breadth_index_new", (DL_FUNC)&wk_absolute_breadth_index_new, 0}, + {"wk_absolute_breadth_index_update", (DL_FUNC)&wk_absolute_breadth_index_update, 8}, + {"wk_absolute_breadth_index_reset", (DL_FUNC)&wk_absolute_breadth_index_reset, 1}, + {"wk_acceleration_bands_new", (DL_FUNC)&wk_acceleration_bands_new, 2}, + {"wk_acceleration_bands_update", (DL_FUNC)&wk_acceleration_bands_update, 7}, + {"wk_acceleration_bands_reset", (DL_FUNC)&wk_acceleration_bands_reset, 1}, + {"wk_accelerator_oscillator_new", (DL_FUNC)&wk_accelerator_oscillator_new, 3}, + {"wk_accelerator_oscillator_update", (DL_FUNC)&wk_accelerator_oscillator_update, 7}, + {"wk_accelerator_oscillator_batch", (DL_FUNC)&wk_accelerator_oscillator_batch, 7}, + {"wk_accelerator_oscillator_reset", (DL_FUNC)&wk_accelerator_oscillator_reset, 1}, + {"wk_ad_oscillator_new", (DL_FUNC)&wk_ad_oscillator_new, 0}, + {"wk_ad_oscillator_update", (DL_FUNC)&wk_ad_oscillator_update, 7}, + {"wk_ad_oscillator_batch", (DL_FUNC)&wk_ad_oscillator_batch, 7}, + {"wk_ad_oscillator_reset", (DL_FUNC)&wk_ad_oscillator_reset, 1}, + {"wk_ad_volume_line_new", (DL_FUNC)&wk_ad_volume_line_new, 0}, + {"wk_ad_volume_line_update", (DL_FUNC)&wk_ad_volume_line_update, 8}, + {"wk_ad_volume_line_reset", (DL_FUNC)&wk_ad_volume_line_reset, 1}, + {"wk_adaptive_cci_new", (DL_FUNC)&wk_adaptive_cci_new, 1}, + {"wk_adaptive_cci_update", (DL_FUNC)&wk_adaptive_cci_update, 7}, + {"wk_adaptive_cci_batch", (DL_FUNC)&wk_adaptive_cci_batch, 7}, + {"wk_adaptive_cci_reset", (DL_FUNC)&wk_adaptive_cci_reset, 1}, + {"wk_adaptive_cycle_new", (DL_FUNC)&wk_adaptive_cycle_new, 0}, + {"wk_adaptive_cycle_update", (DL_FUNC)&wk_adaptive_cycle_update, 2}, + {"wk_adaptive_cycle_batch", (DL_FUNC)&wk_adaptive_cycle_batch, 2}, + {"wk_adaptive_cycle_reset", (DL_FUNC)&wk_adaptive_cycle_reset, 1}, + {"wk_adaptive_laguerre_filter_new", (DL_FUNC)&wk_adaptive_laguerre_filter_new, 1}, + {"wk_adaptive_laguerre_filter_update", (DL_FUNC)&wk_adaptive_laguerre_filter_update, 2}, + {"wk_adaptive_laguerre_filter_batch", (DL_FUNC)&wk_adaptive_laguerre_filter_batch, 2}, + {"wk_adaptive_laguerre_filter_reset", (DL_FUNC)&wk_adaptive_laguerre_filter_reset, 1}, + {"wk_adaptive_rsi_new", (DL_FUNC)&wk_adaptive_rsi_new, 1}, + {"wk_adaptive_rsi_update", (DL_FUNC)&wk_adaptive_rsi_update, 2}, + {"wk_adaptive_rsi_batch", (DL_FUNC)&wk_adaptive_rsi_batch, 2}, + {"wk_adaptive_rsi_reset", (DL_FUNC)&wk_adaptive_rsi_reset, 1}, + {"wk_adl_new", (DL_FUNC)&wk_adl_new, 0}, + {"wk_adl_update", (DL_FUNC)&wk_adl_update, 7}, + {"wk_adl_batch", (DL_FUNC)&wk_adl_batch, 7}, + {"wk_adl_reset", (DL_FUNC)&wk_adl_reset, 1}, + {"wk_advance_block_new", (DL_FUNC)&wk_advance_block_new, 0}, + {"wk_advance_block_update", (DL_FUNC)&wk_advance_block_update, 7}, + {"wk_advance_block_batch", (DL_FUNC)&wk_advance_block_batch, 7}, + {"wk_advance_block_reset", (DL_FUNC)&wk_advance_block_reset, 1}, + {"wk_advance_decline_new", (DL_FUNC)&wk_advance_decline_new, 0}, + {"wk_advance_decline_update", (DL_FUNC)&wk_advance_decline_update, 8}, + {"wk_advance_decline_reset", (DL_FUNC)&wk_advance_decline_reset, 1}, + {"wk_advance_decline_ratio_new", (DL_FUNC)&wk_advance_decline_ratio_new, 0}, + {"wk_advance_decline_ratio_update", (DL_FUNC)&wk_advance_decline_ratio_update, 8}, + {"wk_advance_decline_ratio_reset", (DL_FUNC)&wk_advance_decline_ratio_reset, 1}, + {"wk_adx_new", (DL_FUNC)&wk_adx_new, 1}, + {"wk_adx_update", (DL_FUNC)&wk_adx_update, 7}, + {"wk_adx_reset", (DL_FUNC)&wk_adx_reset, 1}, + {"wk_adxr_new", (DL_FUNC)&wk_adxr_new, 1}, + {"wk_adxr_update", (DL_FUNC)&wk_adxr_update, 7}, + {"wk_adxr_batch", (DL_FUNC)&wk_adxr_batch, 7}, + {"wk_adxr_reset", (DL_FUNC)&wk_adxr_reset, 1}, + {"wk_alligator_new", (DL_FUNC)&wk_alligator_new, 3}, + {"wk_alligator_update", (DL_FUNC)&wk_alligator_update, 7}, + {"wk_alligator_reset", (DL_FUNC)&wk_alligator_reset, 1}, + {"wk_alma_new", (DL_FUNC)&wk_alma_new, 3}, + {"wk_alma_update", (DL_FUNC)&wk_alma_update, 2}, + {"wk_alma_batch", (DL_FUNC)&wk_alma_batch, 2}, + {"wk_alma_reset", (DL_FUNC)&wk_alma_reset, 1}, + {"wk_alpha_new", (DL_FUNC)&wk_alpha_new, 2}, + {"wk_alpha_update", (DL_FUNC)&wk_alpha_update, 3}, + {"wk_alpha_batch", (DL_FUNC)&wk_alpha_batch, 3}, + {"wk_alpha_reset", (DL_FUNC)&wk_alpha_reset, 1}, + {"wk_amihud_illiquidity_new", (DL_FUNC)&wk_amihud_illiquidity_new, 1}, + {"wk_amihud_illiquidity_update", (DL_FUNC)&wk_amihud_illiquidity_update, 5}, + {"wk_amihud_illiquidity_reset", (DL_FUNC)&wk_amihud_illiquidity_reset, 1}, + {"wk_anchored_rsi_new", (DL_FUNC)&wk_anchored_rsi_new, 0}, + {"wk_anchored_rsi_update", (DL_FUNC)&wk_anchored_rsi_update, 2}, + {"wk_anchored_rsi_batch", (DL_FUNC)&wk_anchored_rsi_batch, 2}, + {"wk_anchored_rsi_reset", (DL_FUNC)&wk_anchored_rsi_reset, 1}, + {"wk_anchored_vwap_new", (DL_FUNC)&wk_anchored_vwap_new, 0}, + {"wk_anchored_vwap_update", (DL_FUNC)&wk_anchored_vwap_update, 7}, + {"wk_anchored_vwap_batch", (DL_FUNC)&wk_anchored_vwap_batch, 7}, + {"wk_anchored_vwap_reset", (DL_FUNC)&wk_anchored_vwap_reset, 1}, + {"wk_andrews_pitchfork_new", (DL_FUNC)&wk_andrews_pitchfork_new, 1}, + {"wk_andrews_pitchfork_update", (DL_FUNC)&wk_andrews_pitchfork_update, 7}, + {"wk_andrews_pitchfork_reset", (DL_FUNC)&wk_andrews_pitchfork_reset, 1}, + {"wk_apo_new", (DL_FUNC)&wk_apo_new, 2}, + {"wk_apo_update", (DL_FUNC)&wk_apo_update, 2}, + {"wk_apo_batch", (DL_FUNC)&wk_apo_batch, 2}, + {"wk_apo_reset", (DL_FUNC)&wk_apo_reset, 1}, + {"wk_aroon_new", (DL_FUNC)&wk_aroon_new, 1}, + {"wk_aroon_update", (DL_FUNC)&wk_aroon_update, 7}, + {"wk_aroon_reset", (DL_FUNC)&wk_aroon_reset, 1}, + {"wk_aroon_oscillator_new", (DL_FUNC)&wk_aroon_oscillator_new, 1}, + {"wk_aroon_oscillator_update", (DL_FUNC)&wk_aroon_oscillator_update, 7}, + {"wk_aroon_oscillator_batch", (DL_FUNC)&wk_aroon_oscillator_batch, 7}, + {"wk_aroon_oscillator_reset", (DL_FUNC)&wk_aroon_oscillator_reset, 1}, + {"wk_atr_new", (DL_FUNC)&wk_atr_new, 1}, + {"wk_atr_update", (DL_FUNC)&wk_atr_update, 7}, + {"wk_atr_batch", (DL_FUNC)&wk_atr_batch, 7}, + {"wk_atr_reset", (DL_FUNC)&wk_atr_reset, 1}, + {"wk_atr_bands_new", (DL_FUNC)&wk_atr_bands_new, 2}, + {"wk_atr_bands_update", (DL_FUNC)&wk_atr_bands_update, 7}, + {"wk_atr_bands_reset", (DL_FUNC)&wk_atr_bands_reset, 1}, + {"wk_atr_ratchet_new", (DL_FUNC)&wk_atr_ratchet_new, 3}, + {"wk_atr_ratchet_update", (DL_FUNC)&wk_atr_ratchet_update, 7}, + {"wk_atr_ratchet_reset", (DL_FUNC)&wk_atr_ratchet_reset, 1}, + {"wk_atr_trailing_stop_new", (DL_FUNC)&wk_atr_trailing_stop_new, 2}, + {"wk_atr_trailing_stop_update", (DL_FUNC)&wk_atr_trailing_stop_update, 7}, + {"wk_atr_trailing_stop_batch", (DL_FUNC)&wk_atr_trailing_stop_batch, 7}, + {"wk_atr_trailing_stop_reset", (DL_FUNC)&wk_atr_trailing_stop_reset, 1}, + {"wk_auto_fib_new", (DL_FUNC)&wk_auto_fib_new, 0}, + {"wk_auto_fib_update", (DL_FUNC)&wk_auto_fib_update, 7}, + {"wk_auto_fib_reset", (DL_FUNC)&wk_auto_fib_reset, 1}, + {"wk_autocorrelation_new", (DL_FUNC)&wk_autocorrelation_new, 2}, + {"wk_autocorrelation_update", (DL_FUNC)&wk_autocorrelation_update, 2}, + {"wk_autocorrelation_batch", (DL_FUNC)&wk_autocorrelation_batch, 2}, + {"wk_autocorrelation_reset", (DL_FUNC)&wk_autocorrelation_reset, 1}, + {"wk_autocorrelation_periodogram_new", (DL_FUNC)&wk_autocorrelation_periodogram_new, 2}, + {"wk_autocorrelation_periodogram_update", (DL_FUNC)&wk_autocorrelation_periodogram_update, 2}, + {"wk_autocorrelation_periodogram_batch", (DL_FUNC)&wk_autocorrelation_periodogram_batch, 2}, + {"wk_autocorrelation_periodogram_reset", (DL_FUNC)&wk_autocorrelation_periodogram_reset, 1}, + {"wk_average_daily_range_new", (DL_FUNC)&wk_average_daily_range_new, 2}, + {"wk_average_daily_range_update", (DL_FUNC)&wk_average_daily_range_update, 7}, + {"wk_average_daily_range_batch", (DL_FUNC)&wk_average_daily_range_batch, 7}, + {"wk_average_daily_range_reset", (DL_FUNC)&wk_average_daily_range_reset, 1}, + {"wk_average_drawdown_new", (DL_FUNC)&wk_average_drawdown_new, 1}, + {"wk_average_drawdown_update", (DL_FUNC)&wk_average_drawdown_update, 2}, + {"wk_average_drawdown_batch", (DL_FUNC)&wk_average_drawdown_batch, 2}, + {"wk_average_drawdown_reset", (DL_FUNC)&wk_average_drawdown_reset, 1}, + {"wk_avg_price_new", (DL_FUNC)&wk_avg_price_new, 0}, + {"wk_avg_price_update", (DL_FUNC)&wk_avg_price_update, 7}, + {"wk_avg_price_batch", (DL_FUNC)&wk_avg_price_batch, 7}, + {"wk_avg_price_reset", (DL_FUNC)&wk_avg_price_reset, 1}, + {"wk_awesome_oscillator_new", (DL_FUNC)&wk_awesome_oscillator_new, 2}, + {"wk_awesome_oscillator_update", (DL_FUNC)&wk_awesome_oscillator_update, 7}, + {"wk_awesome_oscillator_batch", (DL_FUNC)&wk_awesome_oscillator_batch, 7}, + {"wk_awesome_oscillator_reset", (DL_FUNC)&wk_awesome_oscillator_reset, 1}, + {"wk_awesome_oscillator_histogram_new", (DL_FUNC)&wk_awesome_oscillator_histogram_new, 3}, + {"wk_awesome_oscillator_histogram_update", (DL_FUNC)&wk_awesome_oscillator_histogram_update, 7}, + {"wk_awesome_oscillator_histogram_batch", (DL_FUNC)&wk_awesome_oscillator_histogram_batch, 7}, + {"wk_awesome_oscillator_histogram_reset", (DL_FUNC)&wk_awesome_oscillator_histogram_reset, 1}, + {"wk_balance_of_power_new", (DL_FUNC)&wk_balance_of_power_new, 0}, + {"wk_balance_of_power_update", (DL_FUNC)&wk_balance_of_power_update, 7}, + {"wk_balance_of_power_batch", (DL_FUNC)&wk_balance_of_power_batch, 7}, + {"wk_balance_of_power_reset", (DL_FUNC)&wk_balance_of_power_reset, 1}, + {"wk_bandpass_filter_new", (DL_FUNC)&wk_bandpass_filter_new, 2}, + {"wk_bandpass_filter_update", (DL_FUNC)&wk_bandpass_filter_update, 2}, + {"wk_bandpass_filter_batch", (DL_FUNC)&wk_bandpass_filter_batch, 2}, + {"wk_bandpass_filter_reset", (DL_FUNC)&wk_bandpass_filter_reset, 1}, + {"wk_bat_new", (DL_FUNC)&wk_bat_new, 0}, + {"wk_bat_update", (DL_FUNC)&wk_bat_update, 7}, + {"wk_bat_batch", (DL_FUNC)&wk_bat_batch, 7}, + {"wk_bat_reset", (DL_FUNC)&wk_bat_reset, 1}, + {"wk_belt_hold_new", (DL_FUNC)&wk_belt_hold_new, 0}, + {"wk_belt_hold_update", (DL_FUNC)&wk_belt_hold_update, 7}, + {"wk_belt_hold_batch", (DL_FUNC)&wk_belt_hold_batch, 7}, + {"wk_belt_hold_reset", (DL_FUNC)&wk_belt_hold_reset, 1}, + {"wk_beta_new", (DL_FUNC)&wk_beta_new, 1}, + {"wk_beta_update", (DL_FUNC)&wk_beta_update, 3}, + {"wk_beta_batch", (DL_FUNC)&wk_beta_batch, 3}, + {"wk_beta_reset", (DL_FUNC)&wk_beta_reset, 1}, + {"wk_beta_neutral_spread_new", (DL_FUNC)&wk_beta_neutral_spread_new, 1}, + {"wk_beta_neutral_spread_update", (DL_FUNC)&wk_beta_neutral_spread_update, 3}, + {"wk_beta_neutral_spread_batch", (DL_FUNC)&wk_beta_neutral_spread_batch, 3}, + {"wk_beta_neutral_spread_reset", (DL_FUNC)&wk_beta_neutral_spread_reset, 1}, + {"wk_better_volume_new", (DL_FUNC)&wk_better_volume_new, 1}, + {"wk_better_volume_update", (DL_FUNC)&wk_better_volume_update, 7}, + {"wk_better_volume_batch", (DL_FUNC)&wk_better_volume_batch, 7}, + {"wk_better_volume_reset", (DL_FUNC)&wk_better_volume_reset, 1}, + {"wk_bipower_variation_new", (DL_FUNC)&wk_bipower_variation_new, 1}, + {"wk_bipower_variation_update", (DL_FUNC)&wk_bipower_variation_update, 2}, + {"wk_bipower_variation_batch", (DL_FUNC)&wk_bipower_variation_batch, 2}, + {"wk_bipower_variation_reset", (DL_FUNC)&wk_bipower_variation_reset, 1}, + {"wk_body_size_pct_new", (DL_FUNC)&wk_body_size_pct_new, 0}, + {"wk_body_size_pct_update", (DL_FUNC)&wk_body_size_pct_update, 7}, + {"wk_body_size_pct_batch", (DL_FUNC)&wk_body_size_pct_batch, 7}, + {"wk_body_size_pct_reset", (DL_FUNC)&wk_body_size_pct_reset, 1}, + {"wk_bollinger_bands_new", (DL_FUNC)&wk_bollinger_bands_new, 2}, + {"wk_bollinger_bands_update", (DL_FUNC)&wk_bollinger_bands_update, 2}, + {"wk_bollinger_bands_reset", (DL_FUNC)&wk_bollinger_bands_reset, 1}, + {"wk_bollinger_bandwidth_new", (DL_FUNC)&wk_bollinger_bandwidth_new, 2}, + {"wk_bollinger_bandwidth_update", (DL_FUNC)&wk_bollinger_bandwidth_update, 2}, + {"wk_bollinger_bandwidth_batch", (DL_FUNC)&wk_bollinger_bandwidth_batch, 2}, + {"wk_bollinger_bandwidth_reset", (DL_FUNC)&wk_bollinger_bandwidth_reset, 1}, + {"wk_bomar_bands_new", (DL_FUNC)&wk_bomar_bands_new, 2}, + {"wk_bomar_bands_update", (DL_FUNC)&wk_bomar_bands_update, 2}, + {"wk_bomar_bands_reset", (DL_FUNC)&wk_bomar_bands_reset, 1}, + {"wk_breadth_thrust_new", (DL_FUNC)&wk_breadth_thrust_new, 1}, + {"wk_breadth_thrust_update", (DL_FUNC)&wk_breadth_thrust_update, 8}, + {"wk_breadth_thrust_reset", (DL_FUNC)&wk_breadth_thrust_reset, 1}, + {"wk_breakaway_new", (DL_FUNC)&wk_breakaway_new, 0}, + {"wk_breakaway_update", (DL_FUNC)&wk_breakaway_update, 7}, + {"wk_breakaway_batch", (DL_FUNC)&wk_breakaway_batch, 7}, + {"wk_breakaway_reset", (DL_FUNC)&wk_breakaway_reset, 1}, + {"wk_bullish_percent_index_new", (DL_FUNC)&wk_bullish_percent_index_new, 0}, + {"wk_bullish_percent_index_update", (DL_FUNC)&wk_bullish_percent_index_update, 8}, + {"wk_bullish_percent_index_reset", (DL_FUNC)&wk_bullish_percent_index_reset, 1}, + {"wk_burke_ratio_new", (DL_FUNC)&wk_burke_ratio_new, 1}, + {"wk_burke_ratio_update", (DL_FUNC)&wk_burke_ratio_update, 2}, + {"wk_burke_ratio_batch", (DL_FUNC)&wk_burke_ratio_batch, 2}, + {"wk_burke_ratio_reset", (DL_FUNC)&wk_burke_ratio_reset, 1}, + {"wk_butterfly_new", (DL_FUNC)&wk_butterfly_new, 0}, + {"wk_butterfly_update", (DL_FUNC)&wk_butterfly_update, 7}, + {"wk_butterfly_batch", (DL_FUNC)&wk_butterfly_batch, 7}, + {"wk_butterfly_reset", (DL_FUNC)&wk_butterfly_reset, 1}, + {"wk_calendar_spread_new", (DL_FUNC)&wk_calendar_spread_new, 0}, + {"wk_calendar_spread_update", (DL_FUNC)&wk_calendar_spread_update, 13}, + {"wk_calendar_spread_reset", (DL_FUNC)&wk_calendar_spread_reset, 1}, + {"wk_calmar_ratio_new", (DL_FUNC)&wk_calmar_ratio_new, 1}, + {"wk_calmar_ratio_update", (DL_FUNC)&wk_calmar_ratio_update, 2}, + {"wk_calmar_ratio_batch", (DL_FUNC)&wk_calmar_ratio_batch, 2}, + {"wk_calmar_ratio_reset", (DL_FUNC)&wk_calmar_ratio_reset, 1}, + {"wk_camarilla_new", (DL_FUNC)&wk_camarilla_new, 0}, + {"wk_camarilla_update", (DL_FUNC)&wk_camarilla_update, 7}, + {"wk_camarilla_reset", (DL_FUNC)&wk_camarilla_reset, 1}, + {"wk_candle_volume_new", (DL_FUNC)&wk_candle_volume_new, 1}, + {"wk_candle_volume_update", (DL_FUNC)&wk_candle_volume_update, 7}, + {"wk_candle_volume_reset", (DL_FUNC)&wk_candle_volume_reset, 1}, + {"wk_cci_new", (DL_FUNC)&wk_cci_new, 1}, + {"wk_cci_update", (DL_FUNC)&wk_cci_update, 7}, + {"wk_cci_batch", (DL_FUNC)&wk_cci_batch, 7}, + {"wk_cci_reset", (DL_FUNC)&wk_cci_reset, 1}, + {"wk_center_of_gravity_new", (DL_FUNC)&wk_center_of_gravity_new, 1}, + {"wk_center_of_gravity_update", (DL_FUNC)&wk_center_of_gravity_update, 2}, + {"wk_center_of_gravity_batch", (DL_FUNC)&wk_center_of_gravity_batch, 2}, + {"wk_center_of_gravity_reset", (DL_FUNC)&wk_center_of_gravity_reset, 1}, + {"wk_central_pivot_range_new", (DL_FUNC)&wk_central_pivot_range_new, 0}, + {"wk_central_pivot_range_update", (DL_FUNC)&wk_central_pivot_range_update, 7}, + {"wk_central_pivot_range_reset", (DL_FUNC)&wk_central_pivot_range_reset, 1}, + {"wk_cfo_new", (DL_FUNC)&wk_cfo_new, 1}, + {"wk_cfo_update", (DL_FUNC)&wk_cfo_update, 2}, + {"wk_cfo_batch", (DL_FUNC)&wk_cfo_batch, 2}, + {"wk_cfo_reset", (DL_FUNC)&wk_cfo_reset, 1}, + {"wk_chaikin_money_flow_new", (DL_FUNC)&wk_chaikin_money_flow_new, 1}, + {"wk_chaikin_money_flow_update", (DL_FUNC)&wk_chaikin_money_flow_update, 7}, + {"wk_chaikin_money_flow_batch", (DL_FUNC)&wk_chaikin_money_flow_batch, 7}, + {"wk_chaikin_money_flow_reset", (DL_FUNC)&wk_chaikin_money_flow_reset, 1}, + {"wk_chaikin_oscillator_new", (DL_FUNC)&wk_chaikin_oscillator_new, 2}, + {"wk_chaikin_oscillator_update", (DL_FUNC)&wk_chaikin_oscillator_update, 7}, + {"wk_chaikin_oscillator_batch", (DL_FUNC)&wk_chaikin_oscillator_batch, 7}, + {"wk_chaikin_oscillator_reset", (DL_FUNC)&wk_chaikin_oscillator_reset, 1}, + {"wk_chaikin_volatility_new", (DL_FUNC)&wk_chaikin_volatility_new, 2}, + {"wk_chaikin_volatility_update", (DL_FUNC)&wk_chaikin_volatility_update, 7}, + {"wk_chaikin_volatility_batch", (DL_FUNC)&wk_chaikin_volatility_batch, 7}, + {"wk_chaikin_volatility_reset", (DL_FUNC)&wk_chaikin_volatility_reset, 1}, + {"wk_chande_kroll_stop_new", (DL_FUNC)&wk_chande_kroll_stop_new, 3}, + {"wk_chande_kroll_stop_update", (DL_FUNC)&wk_chande_kroll_stop_update, 7}, + {"wk_chande_kroll_stop_reset", (DL_FUNC)&wk_chande_kroll_stop_reset, 1}, + {"wk_chandelier_exit_new", (DL_FUNC)&wk_chandelier_exit_new, 2}, + {"wk_chandelier_exit_update", (DL_FUNC)&wk_chandelier_exit_update, 7}, + {"wk_chandelier_exit_reset", (DL_FUNC)&wk_chandelier_exit_reset, 1}, + {"wk_choppiness_index_new", (DL_FUNC)&wk_choppiness_index_new, 1}, + {"wk_choppiness_index_update", (DL_FUNC)&wk_choppiness_index_update, 7}, + {"wk_choppiness_index_batch", (DL_FUNC)&wk_choppiness_index_batch, 7}, + {"wk_choppiness_index_reset", (DL_FUNC)&wk_choppiness_index_reset, 1}, + {"wk_classic_pivots_new", (DL_FUNC)&wk_classic_pivots_new, 0}, + {"wk_classic_pivots_update", (DL_FUNC)&wk_classic_pivots_update, 7}, + {"wk_classic_pivots_reset", (DL_FUNC)&wk_classic_pivots_reset, 1}, + {"wk_close_vs_open_new", (DL_FUNC)&wk_close_vs_open_new, 0}, + {"wk_close_vs_open_update", (DL_FUNC)&wk_close_vs_open_update, 7}, + {"wk_close_vs_open_batch", (DL_FUNC)&wk_close_vs_open_batch, 7}, + {"wk_close_vs_open_reset", (DL_FUNC)&wk_close_vs_open_reset, 1}, + {"wk_closing_marubozu_new", (DL_FUNC)&wk_closing_marubozu_new, 0}, + {"wk_closing_marubozu_update", (DL_FUNC)&wk_closing_marubozu_update, 7}, + {"wk_closing_marubozu_batch", (DL_FUNC)&wk_closing_marubozu_batch, 7}, + {"wk_closing_marubozu_reset", (DL_FUNC)&wk_closing_marubozu_reset, 1}, + {"wk_cmo_new", (DL_FUNC)&wk_cmo_new, 1}, + {"wk_cmo_update", (DL_FUNC)&wk_cmo_update, 2}, + {"wk_cmo_batch", (DL_FUNC)&wk_cmo_batch, 2}, + {"wk_cmo_reset", (DL_FUNC)&wk_cmo_reset, 1}, + {"wk_coefficient_of_variation_new", (DL_FUNC)&wk_coefficient_of_variation_new, 1}, + {"wk_coefficient_of_variation_update", (DL_FUNC)&wk_coefficient_of_variation_update, 2}, + {"wk_coefficient_of_variation_batch", (DL_FUNC)&wk_coefficient_of_variation_batch, 2}, + {"wk_coefficient_of_variation_reset", (DL_FUNC)&wk_coefficient_of_variation_reset, 1}, + {"wk_cointegration_new", (DL_FUNC)&wk_cointegration_new, 2}, + {"wk_cointegration_update", (DL_FUNC)&wk_cointegration_update, 3}, + {"wk_cointegration_reset", (DL_FUNC)&wk_cointegration_reset, 1}, + {"wk_common_sense_ratio_new", (DL_FUNC)&wk_common_sense_ratio_new, 1}, + {"wk_common_sense_ratio_update", (DL_FUNC)&wk_common_sense_ratio_update, 2}, + {"wk_common_sense_ratio_batch", (DL_FUNC)&wk_common_sense_ratio_batch, 2}, + {"wk_common_sense_ratio_reset", (DL_FUNC)&wk_common_sense_ratio_reset, 1}, + {"wk_composite_profile_new", (DL_FUNC)&wk_composite_profile_new, 3}, + {"wk_composite_profile_update", (DL_FUNC)&wk_composite_profile_update, 7}, + {"wk_composite_profile_reset", (DL_FUNC)&wk_composite_profile_reset, 1}, + {"wk_concealing_baby_swallow_new", (DL_FUNC)&wk_concealing_baby_swallow_new, 0}, + {"wk_concealing_baby_swallow_update", (DL_FUNC)&wk_concealing_baby_swallow_update, 7}, + {"wk_concealing_baby_swallow_batch", (DL_FUNC)&wk_concealing_baby_swallow_batch, 7}, + {"wk_concealing_baby_swallow_reset", (DL_FUNC)&wk_concealing_baby_swallow_reset, 1}, + {"wk_conditional_value_at_risk_new", (DL_FUNC)&wk_conditional_value_at_risk_new, 2}, + {"wk_conditional_value_at_risk_update", (DL_FUNC)&wk_conditional_value_at_risk_update, 2}, + {"wk_conditional_value_at_risk_batch", (DL_FUNC)&wk_conditional_value_at_risk_batch, 2}, + {"wk_conditional_value_at_risk_reset", (DL_FUNC)&wk_conditional_value_at_risk_reset, 1}, + {"wk_connors_rsi_new", (DL_FUNC)&wk_connors_rsi_new, 3}, + {"wk_connors_rsi_update", (DL_FUNC)&wk_connors_rsi_update, 2}, + {"wk_connors_rsi_batch", (DL_FUNC)&wk_connors_rsi_batch, 2}, + {"wk_connors_rsi_reset", (DL_FUNC)&wk_connors_rsi_reset, 1}, + {"wk_coppock_new", (DL_FUNC)&wk_coppock_new, 3}, + {"wk_coppock_update", (DL_FUNC)&wk_coppock_update, 2}, + {"wk_coppock_batch", (DL_FUNC)&wk_coppock_batch, 2}, + {"wk_coppock_reset", (DL_FUNC)&wk_coppock_reset, 1}, + {"wk_correlation_trend_indicator_new", (DL_FUNC)&wk_correlation_trend_indicator_new, 1}, + {"wk_correlation_trend_indicator_update", (DL_FUNC)&wk_correlation_trend_indicator_update, 2}, + {"wk_correlation_trend_indicator_batch", (DL_FUNC)&wk_correlation_trend_indicator_batch, 2}, + {"wk_correlation_trend_indicator_reset", (DL_FUNC)&wk_correlation_trend_indicator_reset, 1}, + {"wk_counterattack_new", (DL_FUNC)&wk_counterattack_new, 0}, + {"wk_counterattack_update", (DL_FUNC)&wk_counterattack_update, 7}, + {"wk_counterattack_batch", (DL_FUNC)&wk_counterattack_batch, 7}, + {"wk_counterattack_reset", (DL_FUNC)&wk_counterattack_reset, 1}, + {"wk_crab_new", (DL_FUNC)&wk_crab_new, 0}, + {"wk_crab_update", (DL_FUNC)&wk_crab_update, 7}, + {"wk_crab_batch", (DL_FUNC)&wk_crab_batch, 7}, + {"wk_crab_reset", (DL_FUNC)&wk_crab_reset, 1}, + {"wk_cumulative_volume_delta_new", (DL_FUNC)&wk_cumulative_volume_delta_new, 0}, + {"wk_cumulative_volume_delta_update", (DL_FUNC)&wk_cumulative_volume_delta_update, 5}, + {"wk_cumulative_volume_delta_reset", (DL_FUNC)&wk_cumulative_volume_delta_reset, 1}, + {"wk_cumulative_volume_index_new", (DL_FUNC)&wk_cumulative_volume_index_new, 0}, + {"wk_cumulative_volume_index_update", (DL_FUNC)&wk_cumulative_volume_index_update, 8}, + {"wk_cumulative_volume_index_reset", (DL_FUNC)&wk_cumulative_volume_index_reset, 1}, + {"wk_cup_and_handle_new", (DL_FUNC)&wk_cup_and_handle_new, 0}, + {"wk_cup_and_handle_update", (DL_FUNC)&wk_cup_and_handle_update, 7}, + {"wk_cup_and_handle_batch", (DL_FUNC)&wk_cup_and_handle_batch, 7}, + {"wk_cup_and_handle_reset", (DL_FUNC)&wk_cup_and_handle_reset, 1}, + {"wk_cybernetic_cycle_new", (DL_FUNC)&wk_cybernetic_cycle_new, 1}, + {"wk_cybernetic_cycle_update", (DL_FUNC)&wk_cybernetic_cycle_update, 2}, + {"wk_cybernetic_cycle_batch", (DL_FUNC)&wk_cybernetic_cycle_batch, 2}, + {"wk_cybernetic_cycle_reset", (DL_FUNC)&wk_cybernetic_cycle_reset, 1}, + {"wk_cypher_new", (DL_FUNC)&wk_cypher_new, 0}, + {"wk_cypher_update", (DL_FUNC)&wk_cypher_update, 7}, + {"wk_cypher_batch", (DL_FUNC)&wk_cypher_batch, 7}, + {"wk_cypher_reset", (DL_FUNC)&wk_cypher_reset, 1}, + {"wk_day_of_week_profile_new", (DL_FUNC)&wk_day_of_week_profile_new, 1}, + {"wk_day_of_week_profile_update", (DL_FUNC)&wk_day_of_week_profile_update, 8}, + {"wk_day_of_week_profile_reset", (DL_FUNC)&wk_day_of_week_profile_reset, 1}, + {"wk_decycler_new", (DL_FUNC)&wk_decycler_new, 1}, + {"wk_decycler_update", (DL_FUNC)&wk_decycler_update, 2}, + {"wk_decycler_batch", (DL_FUNC)&wk_decycler_batch, 2}, + {"wk_decycler_reset", (DL_FUNC)&wk_decycler_reset, 1}, + {"wk_decycler_oscillator_new", (DL_FUNC)&wk_decycler_oscillator_new, 2}, + {"wk_decycler_oscillator_update", (DL_FUNC)&wk_decycler_oscillator_update, 2}, + {"wk_decycler_oscillator_batch", (DL_FUNC)&wk_decycler_oscillator_batch, 2}, + {"wk_decycler_oscillator_reset", (DL_FUNC)&wk_decycler_oscillator_reset, 1}, + {"wk_dema_new", (DL_FUNC)&wk_dema_new, 1}, + {"wk_dema_update", (DL_FUNC)&wk_dema_update, 2}, + {"wk_dema_batch", (DL_FUNC)&wk_dema_batch, 2}, + {"wk_dema_reset", (DL_FUNC)&wk_dema_reset, 1}, + {"wk_demand_index_new", (DL_FUNC)&wk_demand_index_new, 1}, + {"wk_demand_index_update", (DL_FUNC)&wk_demand_index_update, 7}, + {"wk_demand_index_batch", (DL_FUNC)&wk_demand_index_batch, 7}, + {"wk_demand_index_reset", (DL_FUNC)&wk_demand_index_reset, 1}, + {"wk_demark_pivots_new", (DL_FUNC)&wk_demark_pivots_new, 0}, + {"wk_demark_pivots_update", (DL_FUNC)&wk_demark_pivots_update, 7}, + {"wk_demark_pivots_reset", (DL_FUNC)&wk_demark_pivots_reset, 1}, + {"wk_depth_slope_new", (DL_FUNC)&wk_depth_slope_new, 0}, + {"wk_depth_slope_update", (DL_FUNC)&wk_depth_slope_update, 5}, + {"wk_depth_slope_reset", (DL_FUNC)&wk_depth_slope_reset, 1}, + {"wk_derivative_oscillator_new", (DL_FUNC)&wk_derivative_oscillator_new, 4}, + {"wk_derivative_oscillator_update", (DL_FUNC)&wk_derivative_oscillator_update, 2}, + {"wk_derivative_oscillator_batch", (DL_FUNC)&wk_derivative_oscillator_batch, 2}, + {"wk_derivative_oscillator_reset", (DL_FUNC)&wk_derivative_oscillator_reset, 1}, + {"wk_detrended_std_dev_new", (DL_FUNC)&wk_detrended_std_dev_new, 1}, + {"wk_detrended_std_dev_update", (DL_FUNC)&wk_detrended_std_dev_update, 2}, + {"wk_detrended_std_dev_batch", (DL_FUNC)&wk_detrended_std_dev_batch, 2}, + {"wk_detrended_std_dev_reset", (DL_FUNC)&wk_detrended_std_dev_reset, 1}, + {"wk_disparity_index_new", (DL_FUNC)&wk_disparity_index_new, 1}, + {"wk_disparity_index_update", (DL_FUNC)&wk_disparity_index_update, 2}, + {"wk_disparity_index_batch", (DL_FUNC)&wk_disparity_index_batch, 2}, + {"wk_disparity_index_reset", (DL_FUNC)&wk_disparity_index_reset, 1}, + {"wk_distance_ssd_new", (DL_FUNC)&wk_distance_ssd_new, 1}, + {"wk_distance_ssd_update", (DL_FUNC)&wk_distance_ssd_update, 3}, + {"wk_distance_ssd_batch", (DL_FUNC)&wk_distance_ssd_batch, 3}, + {"wk_distance_ssd_reset", (DL_FUNC)&wk_distance_ssd_reset, 1}, + {"wk_doji_new", (DL_FUNC)&wk_doji_new, 0}, + {"wk_doji_update", (DL_FUNC)&wk_doji_update, 7}, + {"wk_doji_batch", (DL_FUNC)&wk_doji_batch, 7}, + {"wk_doji_reset", (DL_FUNC)&wk_doji_reset, 1}, + {"wk_doji_star_new", (DL_FUNC)&wk_doji_star_new, 0}, + {"wk_doji_star_update", (DL_FUNC)&wk_doji_star_update, 7}, + {"wk_doji_star_batch", (DL_FUNC)&wk_doji_star_batch, 7}, + {"wk_doji_star_reset", (DL_FUNC)&wk_doji_star_reset, 1}, + {"wk_dollar_bars_new", (DL_FUNC)&wk_dollar_bars_new, 1}, + {"wk_dollar_bars_update", (DL_FUNC)&wk_dollar_bars_update, 7}, + {"wk_dollar_bars_reset", (DL_FUNC)&wk_dollar_bars_reset, 1}, + {"wk_donchian_new", (DL_FUNC)&wk_donchian_new, 1}, + {"wk_donchian_update", (DL_FUNC)&wk_donchian_update, 7}, + {"wk_donchian_reset", (DL_FUNC)&wk_donchian_reset, 1}, + {"wk_donchian_stop_new", (DL_FUNC)&wk_donchian_stop_new, 1}, + {"wk_donchian_stop_update", (DL_FUNC)&wk_donchian_stop_update, 7}, + {"wk_donchian_stop_reset", (DL_FUNC)&wk_donchian_stop_reset, 1}, + {"wk_double_bollinger_new", (DL_FUNC)&wk_double_bollinger_new, 3}, + {"wk_double_bollinger_update", (DL_FUNC)&wk_double_bollinger_update, 2}, + {"wk_double_bollinger_reset", (DL_FUNC)&wk_double_bollinger_reset, 1}, + {"wk_double_top_bottom_new", (DL_FUNC)&wk_double_top_bottom_new, 0}, + {"wk_double_top_bottom_update", (DL_FUNC)&wk_double_top_bottom_update, 7}, + {"wk_double_top_bottom_batch", (DL_FUNC)&wk_double_top_bottom_batch, 7}, + {"wk_double_top_bottom_reset", (DL_FUNC)&wk_double_top_bottom_reset, 1}, + {"wk_downside_gap_three_methods_new", (DL_FUNC)&wk_downside_gap_three_methods_new, 0}, + {"wk_downside_gap_three_methods_update", (DL_FUNC)&wk_downside_gap_three_methods_update, 7}, + {"wk_downside_gap_three_methods_batch", (DL_FUNC)&wk_downside_gap_three_methods_batch, 7}, + {"wk_downside_gap_three_methods_reset", (DL_FUNC)&wk_downside_gap_three_methods_reset, 1}, + {"wk_dpo_new", (DL_FUNC)&wk_dpo_new, 1}, + {"wk_dpo_update", (DL_FUNC)&wk_dpo_update, 2}, + {"wk_dpo_batch", (DL_FUNC)&wk_dpo_batch, 2}, + {"wk_dpo_reset", (DL_FUNC)&wk_dpo_reset, 1}, + {"wk_dragonfly_doji_new", (DL_FUNC)&wk_dragonfly_doji_new, 0}, + {"wk_dragonfly_doji_update", (DL_FUNC)&wk_dragonfly_doji_update, 7}, + {"wk_dragonfly_doji_batch", (DL_FUNC)&wk_dragonfly_doji_batch, 7}, + {"wk_dragonfly_doji_reset", (DL_FUNC)&wk_dragonfly_doji_reset, 1}, + {"wk_drawdown_duration_new", (DL_FUNC)&wk_drawdown_duration_new, 0}, + {"wk_drawdown_duration_update", (DL_FUNC)&wk_drawdown_duration_update, 2}, + {"wk_drawdown_duration_batch", (DL_FUNC)&wk_drawdown_duration_batch, 2}, + {"wk_drawdown_duration_reset", (DL_FUNC)&wk_drawdown_duration_reset, 1}, + {"wk_dumpling_top_new", (DL_FUNC)&wk_dumpling_top_new, 1}, + {"wk_dumpling_top_update", (DL_FUNC)&wk_dumpling_top_update, 7}, + {"wk_dumpling_top_batch", (DL_FUNC)&wk_dumpling_top_batch, 7}, + {"wk_dumpling_top_reset", (DL_FUNC)&wk_dumpling_top_reset, 1}, + {"wk_dx_new", (DL_FUNC)&wk_dx_new, 1}, + {"wk_dx_update", (DL_FUNC)&wk_dx_update, 7}, + {"wk_dx_batch", (DL_FUNC)&wk_dx_batch, 7}, + {"wk_dx_reset", (DL_FUNC)&wk_dx_reset, 1}, + {"wk_dynamic_momentum_index_new", (DL_FUNC)&wk_dynamic_momentum_index_new, 1}, + {"wk_dynamic_momentum_index_update", (DL_FUNC)&wk_dynamic_momentum_index_update, 2}, + {"wk_dynamic_momentum_index_batch", (DL_FUNC)&wk_dynamic_momentum_index_batch, 2}, + {"wk_dynamic_momentum_index_reset", (DL_FUNC)&wk_dynamic_momentum_index_reset, 1}, + {"wk_ease_of_movement_new", (DL_FUNC)&wk_ease_of_movement_new, 1}, + {"wk_ease_of_movement_update", (DL_FUNC)&wk_ease_of_movement_update, 7}, + {"wk_ease_of_movement_batch", (DL_FUNC)&wk_ease_of_movement_batch, 7}, + {"wk_ease_of_movement_reset", (DL_FUNC)&wk_ease_of_movement_reset, 1}, + {"wk_effective_spread_new", (DL_FUNC)&wk_effective_spread_new, 0}, + {"wk_effective_spread_update", (DL_FUNC)&wk_effective_spread_update, 6}, + {"wk_effective_spread_reset", (DL_FUNC)&wk_effective_spread_reset, 1}, + {"wk_ehlers_stochastic_new", (DL_FUNC)&wk_ehlers_stochastic_new, 1}, + {"wk_ehlers_stochastic_update", (DL_FUNC)&wk_ehlers_stochastic_update, 2}, + {"wk_ehlers_stochastic_batch", (DL_FUNC)&wk_ehlers_stochastic_batch, 2}, + {"wk_ehlers_stochastic_reset", (DL_FUNC)&wk_ehlers_stochastic_reset, 1}, + {"wk_ehma_new", (DL_FUNC)&wk_ehma_new, 1}, + {"wk_ehma_update", (DL_FUNC)&wk_ehma_update, 2}, + {"wk_ehma_batch", (DL_FUNC)&wk_ehma_batch, 2}, + {"wk_ehma_reset", (DL_FUNC)&wk_ehma_reset, 1}, + {"wk_elder_impulse_new", (DL_FUNC)&wk_elder_impulse_new, 4}, + {"wk_elder_impulse_update", (DL_FUNC)&wk_elder_impulse_update, 2}, + {"wk_elder_impulse_batch", (DL_FUNC)&wk_elder_impulse_batch, 2}, + {"wk_elder_impulse_reset", (DL_FUNC)&wk_elder_impulse_reset, 1}, + {"wk_elder_ray_new", (DL_FUNC)&wk_elder_ray_new, 1}, + {"wk_elder_ray_update", (DL_FUNC)&wk_elder_ray_update, 7}, + {"wk_elder_ray_reset", (DL_FUNC)&wk_elder_ray_reset, 1}, + {"wk_elder_safe_zone_new", (DL_FUNC)&wk_elder_safe_zone_new, 2}, + {"wk_elder_safe_zone_update", (DL_FUNC)&wk_elder_safe_zone_update, 7}, + {"wk_elder_safe_zone_reset", (DL_FUNC)&wk_elder_safe_zone_reset, 1}, + {"wk_ema_new", (DL_FUNC)&wk_ema_new, 1}, + {"wk_ema_update", (DL_FUNC)&wk_ema_update, 2}, + {"wk_ema_batch", (DL_FUNC)&wk_ema_batch, 2}, + {"wk_ema_reset", (DL_FUNC)&wk_ema_reset, 1}, + {"wk_empirical_mode_decomposition_new", (DL_FUNC)&wk_empirical_mode_decomposition_new, 2}, + {"wk_empirical_mode_decomposition_update", (DL_FUNC)&wk_empirical_mode_decomposition_update, 2}, + {"wk_empirical_mode_decomposition_batch", (DL_FUNC)&wk_empirical_mode_decomposition_batch, 2}, + {"wk_empirical_mode_decomposition_reset", (DL_FUNC)&wk_empirical_mode_decomposition_reset, 1}, + {"wk_engulfing_new", (DL_FUNC)&wk_engulfing_new, 0}, + {"wk_engulfing_update", (DL_FUNC)&wk_engulfing_update, 7}, + {"wk_engulfing_batch", (DL_FUNC)&wk_engulfing_batch, 7}, + {"wk_engulfing_reset", (DL_FUNC)&wk_engulfing_reset, 1}, + {"wk_equivolume_new", (DL_FUNC)&wk_equivolume_new, 1}, + {"wk_equivolume_update", (DL_FUNC)&wk_equivolume_update, 7}, + {"wk_equivolume_reset", (DL_FUNC)&wk_equivolume_reset, 1}, + {"wk_estimated_leverage_ratio_new", (DL_FUNC)&wk_estimated_leverage_ratio_new, 0}, + {"wk_estimated_leverage_ratio_update", (DL_FUNC)&wk_estimated_leverage_ratio_update, 13}, + {"wk_estimated_leverage_ratio_reset", (DL_FUNC)&wk_estimated_leverage_ratio_reset, 1}, + {"wk_even_better_sinewave_new", (DL_FUNC)&wk_even_better_sinewave_new, 2}, + {"wk_even_better_sinewave_update", (DL_FUNC)&wk_even_better_sinewave_update, 2}, + {"wk_even_better_sinewave_batch", (DL_FUNC)&wk_even_better_sinewave_batch, 2}, + {"wk_even_better_sinewave_reset", (DL_FUNC)&wk_even_better_sinewave_reset, 1}, + {"wk_evening_doji_star_new", (DL_FUNC)&wk_evening_doji_star_new, 0}, + {"wk_evening_doji_star_update", (DL_FUNC)&wk_evening_doji_star_update, 7}, + {"wk_evening_doji_star_batch", (DL_FUNC)&wk_evening_doji_star_batch, 7}, + {"wk_evening_doji_star_reset", (DL_FUNC)&wk_evening_doji_star_reset, 1}, + {"wk_evwma_new", (DL_FUNC)&wk_evwma_new, 1}, + {"wk_evwma_update", (DL_FUNC)&wk_evwma_update, 7}, + {"wk_evwma_batch", (DL_FUNC)&wk_evwma_batch, 7}, + {"wk_evwma_reset", (DL_FUNC)&wk_evwma_reset, 1}, + {"wk_ewma_volatility_new", (DL_FUNC)&wk_ewma_volatility_new, 1}, + {"wk_ewma_volatility_update", (DL_FUNC)&wk_ewma_volatility_update, 2}, + {"wk_ewma_volatility_batch", (DL_FUNC)&wk_ewma_volatility_batch, 2}, + {"wk_ewma_volatility_reset", (DL_FUNC)&wk_ewma_volatility_reset, 1}, + {"wk_expectancy_new", (DL_FUNC)&wk_expectancy_new, 1}, + {"wk_expectancy_update", (DL_FUNC)&wk_expectancy_update, 2}, + {"wk_expectancy_batch", (DL_FUNC)&wk_expectancy_batch, 2}, + {"wk_expectancy_reset", (DL_FUNC)&wk_expectancy_reset, 1}, + {"wk_falling_three_methods_new", (DL_FUNC)&wk_falling_three_methods_new, 0}, + {"wk_falling_three_methods_update", (DL_FUNC)&wk_falling_three_methods_update, 7}, + {"wk_falling_three_methods_batch", (DL_FUNC)&wk_falling_three_methods_batch, 7}, + {"wk_falling_three_methods_reset", (DL_FUNC)&wk_falling_three_methods_reset, 1}, + {"wk_fama_new", (DL_FUNC)&wk_fama_new, 2}, + {"wk_fama_update", (DL_FUNC)&wk_fama_update, 2}, + {"wk_fama_batch", (DL_FUNC)&wk_fama_batch, 2}, + {"wk_fama_reset", (DL_FUNC)&wk_fama_reset, 1}, + {"wk_fib_arcs_new", (DL_FUNC)&wk_fib_arcs_new, 0}, + {"wk_fib_arcs_update", (DL_FUNC)&wk_fib_arcs_update, 7}, + {"wk_fib_arcs_reset", (DL_FUNC)&wk_fib_arcs_reset, 1}, + {"wk_fib_channel_new", (DL_FUNC)&wk_fib_channel_new, 0}, + {"wk_fib_channel_update", (DL_FUNC)&wk_fib_channel_update, 7}, + {"wk_fib_channel_reset", (DL_FUNC)&wk_fib_channel_reset, 1}, + {"wk_fib_confluence_new", (DL_FUNC)&wk_fib_confluence_new, 0}, + {"wk_fib_confluence_update", (DL_FUNC)&wk_fib_confluence_update, 7}, + {"wk_fib_confluence_reset", (DL_FUNC)&wk_fib_confluence_reset, 1}, + {"wk_fib_extension_new", (DL_FUNC)&wk_fib_extension_new, 0}, + {"wk_fib_extension_update", (DL_FUNC)&wk_fib_extension_update, 7}, + {"wk_fib_extension_reset", (DL_FUNC)&wk_fib_extension_reset, 1}, + {"wk_fib_fan_new", (DL_FUNC)&wk_fib_fan_new, 0}, + {"wk_fib_fan_update", (DL_FUNC)&wk_fib_fan_update, 7}, + {"wk_fib_fan_reset", (DL_FUNC)&wk_fib_fan_reset, 1}, + {"wk_fib_projection_new", (DL_FUNC)&wk_fib_projection_new, 0}, + {"wk_fib_projection_update", (DL_FUNC)&wk_fib_projection_update, 7}, + {"wk_fib_projection_reset", (DL_FUNC)&wk_fib_projection_reset, 1}, + {"wk_fib_retracement_new", (DL_FUNC)&wk_fib_retracement_new, 0}, + {"wk_fib_retracement_update", (DL_FUNC)&wk_fib_retracement_update, 7}, + {"wk_fib_retracement_reset", (DL_FUNC)&wk_fib_retracement_reset, 1}, + {"wk_fib_time_zones_new", (DL_FUNC)&wk_fib_time_zones_new, 0}, + {"wk_fib_time_zones_update", (DL_FUNC)&wk_fib_time_zones_update, 7}, + {"wk_fib_time_zones_reset", (DL_FUNC)&wk_fib_time_zones_reset, 1}, + {"wk_fibonacci_pivots_new", (DL_FUNC)&wk_fibonacci_pivots_new, 0}, + {"wk_fibonacci_pivots_update", (DL_FUNC)&wk_fibonacci_pivots_update, 7}, + {"wk_fibonacci_pivots_reset", (DL_FUNC)&wk_fibonacci_pivots_reset, 1}, + {"wk_fisher_rsi_new", (DL_FUNC)&wk_fisher_rsi_new, 1}, + {"wk_fisher_rsi_update", (DL_FUNC)&wk_fisher_rsi_update, 2}, + {"wk_fisher_rsi_batch", (DL_FUNC)&wk_fisher_rsi_batch, 2}, + {"wk_fisher_rsi_reset", (DL_FUNC)&wk_fisher_rsi_reset, 1}, + {"wk_fisher_transform_new", (DL_FUNC)&wk_fisher_transform_new, 1}, + {"wk_fisher_transform_update", (DL_FUNC)&wk_fisher_transform_update, 2}, + {"wk_fisher_transform_batch", (DL_FUNC)&wk_fisher_transform_batch, 2}, + {"wk_fisher_transform_reset", (DL_FUNC)&wk_fisher_transform_reset, 1}, + {"wk_flag_pennant_new", (DL_FUNC)&wk_flag_pennant_new, 0}, + {"wk_flag_pennant_update", (DL_FUNC)&wk_flag_pennant_update, 7}, + {"wk_flag_pennant_batch", (DL_FUNC)&wk_flag_pennant_batch, 7}, + {"wk_flag_pennant_reset", (DL_FUNC)&wk_flag_pennant_reset, 1}, + {"wk_footprint_new", (DL_FUNC)&wk_footprint_new, 1}, + {"wk_footprint_update", (DL_FUNC)&wk_footprint_update, 5}, + {"wk_footprint_reset", (DL_FUNC)&wk_footprint_reset, 1}, + {"wk_force_index_new", (DL_FUNC)&wk_force_index_new, 1}, + {"wk_force_index_update", (DL_FUNC)&wk_force_index_update, 7}, + {"wk_force_index_batch", (DL_FUNC)&wk_force_index_batch, 7}, + {"wk_force_index_reset", (DL_FUNC)&wk_force_index_reset, 1}, + {"wk_fractal_chaos_bands_new", (DL_FUNC)&wk_fractal_chaos_bands_new, 1}, + {"wk_fractal_chaos_bands_update", (DL_FUNC)&wk_fractal_chaos_bands_update, 7}, + {"wk_fractal_chaos_bands_reset", (DL_FUNC)&wk_fractal_chaos_bands_reset, 1}, + {"wk_frama_new", (DL_FUNC)&wk_frama_new, 1}, + {"wk_frama_update", (DL_FUNC)&wk_frama_update, 2}, + {"wk_frama_batch", (DL_FUNC)&wk_frama_batch, 2}, + {"wk_frama_reset", (DL_FUNC)&wk_frama_reset, 1}, + {"wk_fry_pan_bottom_new", (DL_FUNC)&wk_fry_pan_bottom_new, 1}, + {"wk_fry_pan_bottom_update", (DL_FUNC)&wk_fry_pan_bottom_update, 7}, + {"wk_fry_pan_bottom_batch", (DL_FUNC)&wk_fry_pan_bottom_batch, 7}, + {"wk_fry_pan_bottom_reset", (DL_FUNC)&wk_fry_pan_bottom_reset, 1}, + {"wk_funding_basis_new", (DL_FUNC)&wk_funding_basis_new, 0}, + {"wk_funding_basis_update", (DL_FUNC)&wk_funding_basis_update, 13}, + {"wk_funding_basis_reset", (DL_FUNC)&wk_funding_basis_reset, 1}, + {"wk_funding_implied_apr_new", (DL_FUNC)&wk_funding_implied_apr_new, 1}, + {"wk_funding_implied_apr_update", (DL_FUNC)&wk_funding_implied_apr_update, 13}, + {"wk_funding_implied_apr_reset", (DL_FUNC)&wk_funding_implied_apr_reset, 1}, + {"wk_funding_rate_new", (DL_FUNC)&wk_funding_rate_new, 0}, + {"wk_funding_rate_update", (DL_FUNC)&wk_funding_rate_update, 13}, + {"wk_funding_rate_reset", (DL_FUNC)&wk_funding_rate_reset, 1}, + {"wk_funding_rate_mean_new", (DL_FUNC)&wk_funding_rate_mean_new, 1}, + {"wk_funding_rate_mean_update", (DL_FUNC)&wk_funding_rate_mean_update, 13}, + {"wk_funding_rate_mean_reset", (DL_FUNC)&wk_funding_rate_mean_reset, 1}, + {"wk_funding_rate_z_score_new", (DL_FUNC)&wk_funding_rate_z_score_new, 1}, + {"wk_funding_rate_z_score_update", (DL_FUNC)&wk_funding_rate_z_score_update, 13}, + {"wk_funding_rate_z_score_reset", (DL_FUNC)&wk_funding_rate_z_score_reset, 1}, + {"wk_gain_loss_ratio_new", (DL_FUNC)&wk_gain_loss_ratio_new, 1}, + {"wk_gain_loss_ratio_update", (DL_FUNC)&wk_gain_loss_ratio_update, 2}, + {"wk_gain_loss_ratio_batch", (DL_FUNC)&wk_gain_loss_ratio_batch, 2}, + {"wk_gain_loss_ratio_reset", (DL_FUNC)&wk_gain_loss_ratio_reset, 1}, + {"wk_gain_to_pain_ratio_new", (DL_FUNC)&wk_gain_to_pain_ratio_new, 1}, + {"wk_gain_to_pain_ratio_update", (DL_FUNC)&wk_gain_to_pain_ratio_update, 2}, + {"wk_gain_to_pain_ratio_batch", (DL_FUNC)&wk_gain_to_pain_ratio_batch, 2}, + {"wk_gain_to_pain_ratio_reset", (DL_FUNC)&wk_gain_to_pain_ratio_reset, 1}, + {"wk_gap_side_by_side_white_new", (DL_FUNC)&wk_gap_side_by_side_white_new, 0}, + {"wk_gap_side_by_side_white_update", (DL_FUNC)&wk_gap_side_by_side_white_update, 7}, + {"wk_gap_side_by_side_white_batch", (DL_FUNC)&wk_gap_side_by_side_white_batch, 7}, + {"wk_gap_side_by_side_white_reset", (DL_FUNC)&wk_gap_side_by_side_white_reset, 1}, + {"wk_garch11_new", (DL_FUNC)&wk_garch11_new, 3}, + {"wk_garch11_update", (DL_FUNC)&wk_garch11_update, 2}, + {"wk_garch11_batch", (DL_FUNC)&wk_garch11_batch, 2}, + {"wk_garch11_reset", (DL_FUNC)&wk_garch11_reset, 1}, + {"wk_garman_klass_volatility_new", (DL_FUNC)&wk_garman_klass_volatility_new, 2}, + {"wk_garman_klass_volatility_update", (DL_FUNC)&wk_garman_klass_volatility_update, 7}, + {"wk_garman_klass_volatility_batch", (DL_FUNC)&wk_garman_klass_volatility_batch, 7}, + {"wk_garman_klass_volatility_reset", (DL_FUNC)&wk_garman_klass_volatility_reset, 1}, + {"wk_gartley_new", (DL_FUNC)&wk_gartley_new, 0}, + {"wk_gartley_update", (DL_FUNC)&wk_gartley_update, 7}, + {"wk_gartley_batch", (DL_FUNC)&wk_gartley_batch, 7}, + {"wk_gartley_reset", (DL_FUNC)&wk_gartley_reset, 1}, + {"wk_gator_oscillator_new", (DL_FUNC)&wk_gator_oscillator_new, 3}, + {"wk_gator_oscillator_update", (DL_FUNC)&wk_gator_oscillator_update, 7}, + {"wk_gator_oscillator_reset", (DL_FUNC)&wk_gator_oscillator_reset, 1}, + {"wk_generalized_dema_new", (DL_FUNC)&wk_generalized_dema_new, 2}, + {"wk_generalized_dema_update", (DL_FUNC)&wk_generalized_dema_update, 2}, + {"wk_generalized_dema_batch", (DL_FUNC)&wk_generalized_dema_batch, 2}, + {"wk_generalized_dema_reset", (DL_FUNC)&wk_generalized_dema_reset, 1}, + {"wk_geometric_ma_new", (DL_FUNC)&wk_geometric_ma_new, 1}, + {"wk_geometric_ma_update", (DL_FUNC)&wk_geometric_ma_update, 2}, + {"wk_geometric_ma_batch", (DL_FUNC)&wk_geometric_ma_batch, 2}, + {"wk_geometric_ma_reset", (DL_FUNC)&wk_geometric_ma_reset, 1}, + {"wk_golden_pocket_new", (DL_FUNC)&wk_golden_pocket_new, 0}, + {"wk_golden_pocket_update", (DL_FUNC)&wk_golden_pocket_update, 7}, + {"wk_golden_pocket_reset", (DL_FUNC)&wk_golden_pocket_reset, 1}, + {"wk_granger_causality_new", (DL_FUNC)&wk_granger_causality_new, 2}, + {"wk_granger_causality_update", (DL_FUNC)&wk_granger_causality_update, 3}, + {"wk_granger_causality_batch", (DL_FUNC)&wk_granger_causality_batch, 3}, + {"wk_granger_causality_reset", (DL_FUNC)&wk_granger_causality_reset, 1}, + {"wk_gravestone_doji_new", (DL_FUNC)&wk_gravestone_doji_new, 0}, + {"wk_gravestone_doji_update", (DL_FUNC)&wk_gravestone_doji_update, 7}, + {"wk_gravestone_doji_batch", (DL_FUNC)&wk_gravestone_doji_batch, 7}, + {"wk_gravestone_doji_reset", (DL_FUNC)&wk_gravestone_doji_reset, 1}, + {"wk_hammer_new", (DL_FUNC)&wk_hammer_new, 0}, + {"wk_hammer_update", (DL_FUNC)&wk_hammer_update, 7}, + {"wk_hammer_batch", (DL_FUNC)&wk_hammer_batch, 7}, + {"wk_hammer_reset", (DL_FUNC)&wk_hammer_reset, 1}, + {"wk_hanging_man_new", (DL_FUNC)&wk_hanging_man_new, 0}, + {"wk_hanging_man_update", (DL_FUNC)&wk_hanging_man_update, 7}, + {"wk_hanging_man_batch", (DL_FUNC)&wk_hanging_man_batch, 7}, + {"wk_hanging_man_reset", (DL_FUNC)&wk_hanging_man_reset, 1}, + {"wk_harami_new", (DL_FUNC)&wk_harami_new, 0}, + {"wk_harami_update", (DL_FUNC)&wk_harami_update, 7}, + {"wk_harami_batch", (DL_FUNC)&wk_harami_batch, 7}, + {"wk_harami_reset", (DL_FUNC)&wk_harami_reset, 1}, + {"wk_harami_cross_new", (DL_FUNC)&wk_harami_cross_new, 0}, + {"wk_harami_cross_update", (DL_FUNC)&wk_harami_cross_update, 7}, + {"wk_harami_cross_batch", (DL_FUNC)&wk_harami_cross_batch, 7}, + {"wk_harami_cross_reset", (DL_FUNC)&wk_harami_cross_reset, 1}, + {"wk_hasbrouck_information_share_new", (DL_FUNC)&wk_hasbrouck_information_share_new, 1}, + {"wk_hasbrouck_information_share_update", (DL_FUNC)&wk_hasbrouck_information_share_update, 3}, + {"wk_hasbrouck_information_share_batch", (DL_FUNC)&wk_hasbrouck_information_share_batch, 3}, + {"wk_hasbrouck_information_share_reset", (DL_FUNC)&wk_hasbrouck_information_share_reset, 1}, + {"wk_head_and_shoulders_new", (DL_FUNC)&wk_head_and_shoulders_new, 0}, + {"wk_head_and_shoulders_update", (DL_FUNC)&wk_head_and_shoulders_update, 7}, + {"wk_head_and_shoulders_batch", (DL_FUNC)&wk_head_and_shoulders_batch, 7}, + {"wk_head_and_shoulders_reset", (DL_FUNC)&wk_head_and_shoulders_reset, 1}, + {"wk_heikin_ashi_new", (DL_FUNC)&wk_heikin_ashi_new, 0}, + {"wk_heikin_ashi_update", (DL_FUNC)&wk_heikin_ashi_update, 7}, + {"wk_heikin_ashi_reset", (DL_FUNC)&wk_heikin_ashi_reset, 1}, + {"wk_heikin_ashi_oscillator_new", (DL_FUNC)&wk_heikin_ashi_oscillator_new, 1}, + {"wk_heikin_ashi_oscillator_update", (DL_FUNC)&wk_heikin_ashi_oscillator_update, 7}, + {"wk_heikin_ashi_oscillator_batch", (DL_FUNC)&wk_heikin_ashi_oscillator_batch, 7}, + {"wk_heikin_ashi_oscillator_reset", (DL_FUNC)&wk_heikin_ashi_oscillator_reset, 1}, + {"wk_hi_lo_activator_new", (DL_FUNC)&wk_hi_lo_activator_new, 1}, + {"wk_hi_lo_activator_update", (DL_FUNC)&wk_hi_lo_activator_update, 7}, + {"wk_hi_lo_activator_batch", (DL_FUNC)&wk_hi_lo_activator_batch, 7}, + {"wk_hi_lo_activator_reset", (DL_FUNC)&wk_hi_lo_activator_reset, 1}, + {"wk_high_low_index_new", (DL_FUNC)&wk_high_low_index_new, 1}, + {"wk_high_low_index_update", (DL_FUNC)&wk_high_low_index_update, 8}, + {"wk_high_low_index_reset", (DL_FUNC)&wk_high_low_index_reset, 1}, + {"wk_high_low_range_new", (DL_FUNC)&wk_high_low_range_new, 0}, + {"wk_high_low_range_update", (DL_FUNC)&wk_high_low_range_update, 7}, + {"wk_high_low_range_batch", (DL_FUNC)&wk_high_low_range_batch, 7}, + {"wk_high_low_range_reset", (DL_FUNC)&wk_high_low_range_reset, 1}, + {"wk_high_low_volume_nodes_new", (DL_FUNC)&wk_high_low_volume_nodes_new, 2}, + {"wk_high_low_volume_nodes_update", (DL_FUNC)&wk_high_low_volume_nodes_update, 7}, + {"wk_high_low_volume_nodes_reset", (DL_FUNC)&wk_high_low_volume_nodes_reset, 1}, + {"wk_high_wave_new", (DL_FUNC)&wk_high_wave_new, 0}, + {"wk_high_wave_update", (DL_FUNC)&wk_high_wave_update, 7}, + {"wk_high_wave_batch", (DL_FUNC)&wk_high_wave_batch, 7}, + {"wk_high_wave_reset", (DL_FUNC)&wk_high_wave_reset, 1}, + {"wk_highpass_filter_new", (DL_FUNC)&wk_highpass_filter_new, 1}, + {"wk_highpass_filter_update", (DL_FUNC)&wk_highpass_filter_update, 2}, + {"wk_highpass_filter_batch", (DL_FUNC)&wk_highpass_filter_batch, 2}, + {"wk_highpass_filter_reset", (DL_FUNC)&wk_highpass_filter_reset, 1}, + {"wk_hikkake_new", (DL_FUNC)&wk_hikkake_new, 0}, + {"wk_hikkake_update", (DL_FUNC)&wk_hikkake_update, 7}, + {"wk_hikkake_batch", (DL_FUNC)&wk_hikkake_batch, 7}, + {"wk_hikkake_reset", (DL_FUNC)&wk_hikkake_reset, 1}, + {"wk_hikkake_modified_new", (DL_FUNC)&wk_hikkake_modified_new, 0}, + {"wk_hikkake_modified_update", (DL_FUNC)&wk_hikkake_modified_update, 7}, + {"wk_hikkake_modified_batch", (DL_FUNC)&wk_hikkake_modified_batch, 7}, + {"wk_hikkake_modified_reset", (DL_FUNC)&wk_hikkake_modified_reset, 1}, + {"wk_hilbert_dominant_cycle_new", (DL_FUNC)&wk_hilbert_dominant_cycle_new, 0}, + {"wk_hilbert_dominant_cycle_update", (DL_FUNC)&wk_hilbert_dominant_cycle_update, 2}, + {"wk_hilbert_dominant_cycle_batch", (DL_FUNC)&wk_hilbert_dominant_cycle_batch, 2}, + {"wk_hilbert_dominant_cycle_reset", (DL_FUNC)&wk_hilbert_dominant_cycle_reset, 1}, + {"wk_historical_volatility_new", (DL_FUNC)&wk_historical_volatility_new, 2}, + {"wk_historical_volatility_update", (DL_FUNC)&wk_historical_volatility_update, 2}, + {"wk_historical_volatility_batch", (DL_FUNC)&wk_historical_volatility_batch, 2}, + {"wk_historical_volatility_reset", (DL_FUNC)&wk_historical_volatility_reset, 1}, + {"wk_hma_new", (DL_FUNC)&wk_hma_new, 1}, + {"wk_hma_update", (DL_FUNC)&wk_hma_update, 2}, + {"wk_hma_batch", (DL_FUNC)&wk_hma_batch, 2}, + {"wk_hma_reset", (DL_FUNC)&wk_hma_reset, 1}, + {"wk_holt_winters_new", (DL_FUNC)&wk_holt_winters_new, 2}, + {"wk_holt_winters_update", (DL_FUNC)&wk_holt_winters_update, 2}, + {"wk_holt_winters_batch", (DL_FUNC)&wk_holt_winters_batch, 2}, + {"wk_holt_winters_reset", (DL_FUNC)&wk_holt_winters_reset, 1}, + {"wk_homing_pigeon_new", (DL_FUNC)&wk_homing_pigeon_new, 0}, + {"wk_homing_pigeon_update", (DL_FUNC)&wk_homing_pigeon_update, 7}, + {"wk_homing_pigeon_batch", (DL_FUNC)&wk_homing_pigeon_batch, 7}, + {"wk_homing_pigeon_reset", (DL_FUNC)&wk_homing_pigeon_reset, 1}, + {"wk_ht_dc_phase_new", (DL_FUNC)&wk_ht_dc_phase_new, 0}, + {"wk_ht_dc_phase_update", (DL_FUNC)&wk_ht_dc_phase_update, 2}, + {"wk_ht_dc_phase_batch", (DL_FUNC)&wk_ht_dc_phase_batch, 2}, + {"wk_ht_dc_phase_reset", (DL_FUNC)&wk_ht_dc_phase_reset, 1}, + {"wk_ht_phasor_new", (DL_FUNC)&wk_ht_phasor_new, 0}, + {"wk_ht_phasor_update", (DL_FUNC)&wk_ht_phasor_update, 2}, + {"wk_ht_phasor_reset", (DL_FUNC)&wk_ht_phasor_reset, 1}, + {"wk_ht_trend_mode_new", (DL_FUNC)&wk_ht_trend_mode_new, 0}, + {"wk_ht_trend_mode_update", (DL_FUNC)&wk_ht_trend_mode_update, 2}, + {"wk_ht_trend_mode_batch", (DL_FUNC)&wk_ht_trend_mode_batch, 2}, + {"wk_ht_trend_mode_reset", (DL_FUNC)&wk_ht_trend_mode_reset, 1}, + {"wk_hurst_channel_new", (DL_FUNC)&wk_hurst_channel_new, 2}, + {"wk_hurst_channel_update", (DL_FUNC)&wk_hurst_channel_update, 7}, + {"wk_hurst_channel_reset", (DL_FUNC)&wk_hurst_channel_reset, 1}, + {"wk_hurst_exponent_new", (DL_FUNC)&wk_hurst_exponent_new, 2}, + {"wk_hurst_exponent_update", (DL_FUNC)&wk_hurst_exponent_update, 2}, + {"wk_hurst_exponent_batch", (DL_FUNC)&wk_hurst_exponent_batch, 2}, + {"wk_hurst_exponent_reset", (DL_FUNC)&wk_hurst_exponent_reset, 1}, + {"wk_ichimoku_new", (DL_FUNC)&wk_ichimoku_new, 4}, + {"wk_ichimoku_update", (DL_FUNC)&wk_ichimoku_update, 7}, + {"wk_ichimoku_reset", (DL_FUNC)&wk_ichimoku_reset, 1}, + {"wk_identical_three_crows_new", (DL_FUNC)&wk_identical_three_crows_new, 0}, + {"wk_identical_three_crows_update", (DL_FUNC)&wk_identical_three_crows_update, 7}, + {"wk_identical_three_crows_batch", (DL_FUNC)&wk_identical_three_crows_batch, 7}, + {"wk_identical_three_crows_reset", (DL_FUNC)&wk_identical_three_crows_reset, 1}, + {"wk_imbalance_bars_new", (DL_FUNC)&wk_imbalance_bars_new, 1}, + {"wk_imbalance_bars_update", (DL_FUNC)&wk_imbalance_bars_update, 7}, + {"wk_imbalance_bars_reset", (DL_FUNC)&wk_imbalance_bars_reset, 1}, + {"wk_in_neck_new", (DL_FUNC)&wk_in_neck_new, 0}, + {"wk_in_neck_update", (DL_FUNC)&wk_in_neck_update, 7}, + {"wk_in_neck_batch", (DL_FUNC)&wk_in_neck_batch, 7}, + {"wk_in_neck_reset", (DL_FUNC)&wk_in_neck_reset, 1}, + {"wk_inertia_new", (DL_FUNC)&wk_inertia_new, 2}, + {"wk_inertia_update", (DL_FUNC)&wk_inertia_update, 7}, + {"wk_inertia_batch", (DL_FUNC)&wk_inertia_batch, 7}, + {"wk_inertia_reset", (DL_FUNC)&wk_inertia_reset, 1}, + {"wk_information_ratio_new", (DL_FUNC)&wk_information_ratio_new, 1}, + {"wk_information_ratio_update", (DL_FUNC)&wk_information_ratio_update, 3}, + {"wk_information_ratio_batch", (DL_FUNC)&wk_information_ratio_batch, 3}, + {"wk_information_ratio_reset", (DL_FUNC)&wk_information_ratio_reset, 1}, + {"wk_initial_balance_new", (DL_FUNC)&wk_initial_balance_new, 1}, + {"wk_initial_balance_update", (DL_FUNC)&wk_initial_balance_update, 7}, + {"wk_initial_balance_reset", (DL_FUNC)&wk_initial_balance_reset, 1}, + {"wk_instantaneous_trendline_new", (DL_FUNC)&wk_instantaneous_trendline_new, 1}, + {"wk_instantaneous_trendline_update", (DL_FUNC)&wk_instantaneous_trendline_update, 2}, + {"wk_instantaneous_trendline_batch", (DL_FUNC)&wk_instantaneous_trendline_batch, 2}, + {"wk_instantaneous_trendline_reset", (DL_FUNC)&wk_instantaneous_trendline_reset, 1}, + {"wk_intraday_intensity_new", (DL_FUNC)&wk_intraday_intensity_new, 0}, + {"wk_intraday_intensity_update", (DL_FUNC)&wk_intraday_intensity_update, 7}, + {"wk_intraday_intensity_batch", (DL_FUNC)&wk_intraday_intensity_batch, 7}, + {"wk_intraday_intensity_reset", (DL_FUNC)&wk_intraday_intensity_reset, 1}, + {"wk_intraday_momentum_index_new", (DL_FUNC)&wk_intraday_momentum_index_new, 1}, + {"wk_intraday_momentum_index_update", (DL_FUNC)&wk_intraday_momentum_index_update, 7}, + {"wk_intraday_momentum_index_batch", (DL_FUNC)&wk_intraday_momentum_index_batch, 7}, + {"wk_intraday_momentum_index_reset", (DL_FUNC)&wk_intraday_momentum_index_reset, 1}, + {"wk_intraday_volatility_profile_new", (DL_FUNC)&wk_intraday_volatility_profile_new, 2}, + {"wk_intraday_volatility_profile_update", (DL_FUNC)&wk_intraday_volatility_profile_update, 8}, + {"wk_intraday_volatility_profile_reset", (DL_FUNC)&wk_intraday_volatility_profile_reset, 1}, + {"wk_inverse_fisher_transform_new", (DL_FUNC)&wk_inverse_fisher_transform_new, 1}, + {"wk_inverse_fisher_transform_update", (DL_FUNC)&wk_inverse_fisher_transform_update, 2}, + {"wk_inverse_fisher_transform_batch", (DL_FUNC)&wk_inverse_fisher_transform_batch, 2}, + {"wk_inverse_fisher_transform_reset", (DL_FUNC)&wk_inverse_fisher_transform_reset, 1}, + {"wk_inverted_hammer_new", (DL_FUNC)&wk_inverted_hammer_new, 0}, + {"wk_inverted_hammer_update", (DL_FUNC)&wk_inverted_hammer_update, 7}, + {"wk_inverted_hammer_batch", (DL_FUNC)&wk_inverted_hammer_batch, 7}, + {"wk_inverted_hammer_reset", (DL_FUNC)&wk_inverted_hammer_reset, 1}, + {"wk_jarque_bera_new", (DL_FUNC)&wk_jarque_bera_new, 1}, + {"wk_jarque_bera_update", (DL_FUNC)&wk_jarque_bera_update, 2}, + {"wk_jarque_bera_batch", (DL_FUNC)&wk_jarque_bera_batch, 2}, + {"wk_jarque_bera_reset", (DL_FUNC)&wk_jarque_bera_reset, 1}, + {"wk_jma_new", (DL_FUNC)&wk_jma_new, 3}, + {"wk_jma_update", (DL_FUNC)&wk_jma_update, 2}, + {"wk_jma_batch", (DL_FUNC)&wk_jma_batch, 2}, + {"wk_jma_reset", (DL_FUNC)&wk_jma_reset, 1}, + {"wk_jump_indicator_new", (DL_FUNC)&wk_jump_indicator_new, 2}, + {"wk_jump_indicator_update", (DL_FUNC)&wk_jump_indicator_update, 2}, + {"wk_jump_indicator_batch", (DL_FUNC)&wk_jump_indicator_batch, 2}, + {"wk_jump_indicator_reset", (DL_FUNC)&wk_jump_indicator_reset, 1}, + {"wk_k_ratio_new", (DL_FUNC)&wk_k_ratio_new, 1}, + {"wk_k_ratio_update", (DL_FUNC)&wk_k_ratio_update, 2}, + {"wk_k_ratio_batch", (DL_FUNC)&wk_k_ratio_batch, 2}, + {"wk_k_ratio_reset", (DL_FUNC)&wk_k_ratio_reset, 1}, + {"wk_kagi_bars_new", (DL_FUNC)&wk_kagi_bars_new, 1}, + {"wk_kagi_bars_update", (DL_FUNC)&wk_kagi_bars_update, 7}, + {"wk_kagi_bars_reset", (DL_FUNC)&wk_kagi_bars_reset, 1}, + {"wk_kalman_hedge_ratio_new", (DL_FUNC)&wk_kalman_hedge_ratio_new, 2}, + {"wk_kalman_hedge_ratio_update", (DL_FUNC)&wk_kalman_hedge_ratio_update, 3}, + {"wk_kalman_hedge_ratio_reset", (DL_FUNC)&wk_kalman_hedge_ratio_reset, 1}, + {"wk_kama_new", (DL_FUNC)&wk_kama_new, 3}, + {"wk_kama_update", (DL_FUNC)&wk_kama_update, 2}, + {"wk_kama_batch", (DL_FUNC)&wk_kama_batch, 2}, + {"wk_kama_reset", (DL_FUNC)&wk_kama_reset, 1}, + {"wk_kase_dev_stop_new", (DL_FUNC)&wk_kase_dev_stop_new, 2}, + {"wk_kase_dev_stop_update", (DL_FUNC)&wk_kase_dev_stop_update, 7}, + {"wk_kase_dev_stop_reset", (DL_FUNC)&wk_kase_dev_stop_reset, 1}, + {"wk_kase_permission_stochastic_new", (DL_FUNC)&wk_kase_permission_stochastic_new, 2}, + {"wk_kase_permission_stochastic_update", (DL_FUNC)&wk_kase_permission_stochastic_update, 7}, + {"wk_kase_permission_stochastic_reset", (DL_FUNC)&wk_kase_permission_stochastic_reset, 1}, + {"wk_kelly_criterion_new", (DL_FUNC)&wk_kelly_criterion_new, 1}, + {"wk_kelly_criterion_update", (DL_FUNC)&wk_kelly_criterion_update, 2}, + {"wk_kelly_criterion_batch", (DL_FUNC)&wk_kelly_criterion_batch, 2}, + {"wk_kelly_criterion_reset", (DL_FUNC)&wk_kelly_criterion_reset, 1}, + {"wk_keltner_new", (DL_FUNC)&wk_keltner_new, 3}, + {"wk_keltner_update", (DL_FUNC)&wk_keltner_update, 7}, + {"wk_keltner_reset", (DL_FUNC)&wk_keltner_reset, 1}, + {"wk_kendall_tau_new", (DL_FUNC)&wk_kendall_tau_new, 1}, + {"wk_kendall_tau_update", (DL_FUNC)&wk_kendall_tau_update, 3}, + {"wk_kendall_tau_batch", (DL_FUNC)&wk_kendall_tau_batch, 3}, + {"wk_kendall_tau_reset", (DL_FUNC)&wk_kendall_tau_reset, 1}, + {"wk_kicking_new", (DL_FUNC)&wk_kicking_new, 0}, + {"wk_kicking_update", (DL_FUNC)&wk_kicking_update, 7}, + {"wk_kicking_batch", (DL_FUNC)&wk_kicking_batch, 7}, + {"wk_kicking_reset", (DL_FUNC)&wk_kicking_reset, 1}, + {"wk_kicking_by_length_new", (DL_FUNC)&wk_kicking_by_length_new, 0}, + {"wk_kicking_by_length_update", (DL_FUNC)&wk_kicking_by_length_update, 7}, + {"wk_kicking_by_length_batch", (DL_FUNC)&wk_kicking_by_length_batch, 7}, + {"wk_kicking_by_length_reset", (DL_FUNC)&wk_kicking_by_length_reset, 1}, + {"wk_kst_new", (DL_FUNC)&wk_kst_new, 9}, + {"wk_kst_update", (DL_FUNC)&wk_kst_update, 2}, + {"wk_kst_reset", (DL_FUNC)&wk_kst_reset, 1}, + {"wk_kurtosis_new", (DL_FUNC)&wk_kurtosis_new, 1}, + {"wk_kurtosis_update", (DL_FUNC)&wk_kurtosis_update, 2}, + {"wk_kurtosis_batch", (DL_FUNC)&wk_kurtosis_batch, 2}, + {"wk_kurtosis_reset", (DL_FUNC)&wk_kurtosis_reset, 1}, + {"wk_kvo_new", (DL_FUNC)&wk_kvo_new, 2}, + {"wk_kvo_update", (DL_FUNC)&wk_kvo_update, 7}, + {"wk_kvo_batch", (DL_FUNC)&wk_kvo_batch, 7}, + {"wk_kvo_reset", (DL_FUNC)&wk_kvo_reset, 1}, + {"wk_kyles_lambda_new", (DL_FUNC)&wk_kyles_lambda_new, 1}, + {"wk_kyles_lambda_update", (DL_FUNC)&wk_kyles_lambda_update, 6}, + {"wk_kyles_lambda_reset", (DL_FUNC)&wk_kyles_lambda_reset, 1}, + {"wk_ladder_bottom_new", (DL_FUNC)&wk_ladder_bottom_new, 0}, + {"wk_ladder_bottom_update", (DL_FUNC)&wk_ladder_bottom_update, 7}, + {"wk_ladder_bottom_batch", (DL_FUNC)&wk_ladder_bottom_batch, 7}, + {"wk_ladder_bottom_reset", (DL_FUNC)&wk_ladder_bottom_reset, 1}, + {"wk_laguerre_rsi_new", (DL_FUNC)&wk_laguerre_rsi_new, 1}, + {"wk_laguerre_rsi_update", (DL_FUNC)&wk_laguerre_rsi_update, 2}, + {"wk_laguerre_rsi_batch", (DL_FUNC)&wk_laguerre_rsi_batch, 2}, + {"wk_laguerre_rsi_reset", (DL_FUNC)&wk_laguerre_rsi_reset, 1}, + {"wk_lead_lag_cross_correlation_new", (DL_FUNC)&wk_lead_lag_cross_correlation_new, 2}, + {"wk_lead_lag_cross_correlation_update", (DL_FUNC)&wk_lead_lag_cross_correlation_update, 3}, + {"wk_lead_lag_cross_correlation_reset", (DL_FUNC)&wk_lead_lag_cross_correlation_reset, 1}, + {"wk_lin_reg_angle_new", (DL_FUNC)&wk_lin_reg_angle_new, 1}, + {"wk_lin_reg_angle_update", (DL_FUNC)&wk_lin_reg_angle_update, 2}, + {"wk_lin_reg_angle_batch", (DL_FUNC)&wk_lin_reg_angle_batch, 2}, + {"wk_lin_reg_angle_reset", (DL_FUNC)&wk_lin_reg_angle_reset, 1}, + {"wk_lin_reg_channel_new", (DL_FUNC)&wk_lin_reg_channel_new, 2}, + {"wk_lin_reg_channel_update", (DL_FUNC)&wk_lin_reg_channel_update, 2}, + {"wk_lin_reg_channel_reset", (DL_FUNC)&wk_lin_reg_channel_reset, 1}, + {"wk_lin_reg_intercept_new", (DL_FUNC)&wk_lin_reg_intercept_new, 1}, + {"wk_lin_reg_intercept_update", (DL_FUNC)&wk_lin_reg_intercept_update, 2}, + {"wk_lin_reg_intercept_batch", (DL_FUNC)&wk_lin_reg_intercept_batch, 2}, + {"wk_lin_reg_intercept_reset", (DL_FUNC)&wk_lin_reg_intercept_reset, 1}, + {"wk_lin_reg_slope_new", (DL_FUNC)&wk_lin_reg_slope_new, 1}, + {"wk_lin_reg_slope_update", (DL_FUNC)&wk_lin_reg_slope_update, 2}, + {"wk_lin_reg_slope_batch", (DL_FUNC)&wk_lin_reg_slope_batch, 2}, + {"wk_lin_reg_slope_reset", (DL_FUNC)&wk_lin_reg_slope_reset, 1}, + {"wk_linear_regression_new", (DL_FUNC)&wk_linear_regression_new, 1}, + {"wk_linear_regression_update", (DL_FUNC)&wk_linear_regression_update, 2}, + {"wk_linear_regression_batch", (DL_FUNC)&wk_linear_regression_batch, 2}, + {"wk_linear_regression_reset", (DL_FUNC)&wk_linear_regression_reset, 1}, + {"wk_liquidation_features_new", (DL_FUNC)&wk_liquidation_features_new, 0}, + {"wk_liquidation_features_update", (DL_FUNC)&wk_liquidation_features_update, 13}, + {"wk_liquidation_features_reset", (DL_FUNC)&wk_liquidation_features_reset, 1}, + {"wk_log_return_new", (DL_FUNC)&wk_log_return_new, 1}, + {"wk_log_return_update", (DL_FUNC)&wk_log_return_update, 2}, + {"wk_log_return_batch", (DL_FUNC)&wk_log_return_batch, 2}, + {"wk_log_return_reset", (DL_FUNC)&wk_log_return_reset, 1}, + {"wk_long_legged_doji_new", (DL_FUNC)&wk_long_legged_doji_new, 0}, + {"wk_long_legged_doji_update", (DL_FUNC)&wk_long_legged_doji_update, 7}, + {"wk_long_legged_doji_batch", (DL_FUNC)&wk_long_legged_doji_batch, 7}, + {"wk_long_legged_doji_reset", (DL_FUNC)&wk_long_legged_doji_reset, 1}, + {"wk_long_line_new", (DL_FUNC)&wk_long_line_new, 0}, + {"wk_long_line_update", (DL_FUNC)&wk_long_line_update, 7}, + {"wk_long_line_batch", (DL_FUNC)&wk_long_line_batch, 7}, + {"wk_long_line_reset", (DL_FUNC)&wk_long_line_reset, 1}, + {"wk_long_short_ratio_new", (DL_FUNC)&wk_long_short_ratio_new, 0}, + {"wk_long_short_ratio_update", (DL_FUNC)&wk_long_short_ratio_update, 13}, + {"wk_long_short_ratio_reset", (DL_FUNC)&wk_long_short_ratio_reset, 1}, + {"wk_m2_measure_new", (DL_FUNC)&wk_m2_measure_new, 3}, + {"wk_m2_measure_update", (DL_FUNC)&wk_m2_measure_update, 2}, + {"wk_m2_measure_batch", (DL_FUNC)&wk_m2_measure_batch, 2}, + {"wk_m2_measure_reset", (DL_FUNC)&wk_m2_measure_reset, 1}, + {"wk_ma_envelope_new", (DL_FUNC)&wk_ma_envelope_new, 2}, + {"wk_ma_envelope_update", (DL_FUNC)&wk_ma_envelope_update, 2}, + {"wk_ma_envelope_reset", (DL_FUNC)&wk_ma_envelope_reset, 1}, + {"wk_macd_ext_new", (DL_FUNC)&wk_macd_ext_new, 6}, + {"wk_macd_ext_update", (DL_FUNC)&wk_macd_ext_update, 2}, + {"wk_macd_ext_reset", (DL_FUNC)&wk_macd_ext_reset, 1}, + {"wk_macd_fix_new", (DL_FUNC)&wk_macd_fix_new, 1}, + {"wk_macd_fix_update", (DL_FUNC)&wk_macd_fix_update, 2}, + {"wk_macd_fix_reset", (DL_FUNC)&wk_macd_fix_reset, 1}, + {"wk_macd_histogram_new", (DL_FUNC)&wk_macd_histogram_new, 3}, + {"wk_macd_histogram_update", (DL_FUNC)&wk_macd_histogram_update, 2}, + {"wk_macd_histogram_batch", (DL_FUNC)&wk_macd_histogram_batch, 2}, + {"wk_macd_histogram_reset", (DL_FUNC)&wk_macd_histogram_reset, 1}, + {"wk_macd_indicator_new", (DL_FUNC)&wk_macd_indicator_new, 3}, + {"wk_macd_indicator_update", (DL_FUNC)&wk_macd_indicator_update, 2}, + {"wk_macd_indicator_reset", (DL_FUNC)&wk_macd_indicator_reset, 1}, + {"wk_mama_new", (DL_FUNC)&wk_mama_new, 2}, + {"wk_mama_update", (DL_FUNC)&wk_mama_update, 2}, + {"wk_mama_reset", (DL_FUNC)&wk_mama_reset, 1}, + {"wk_market_facilitation_index_new", (DL_FUNC)&wk_market_facilitation_index_new, 0}, + {"wk_market_facilitation_index_update", (DL_FUNC)&wk_market_facilitation_index_update, 7}, + {"wk_market_facilitation_index_batch", (DL_FUNC)&wk_market_facilitation_index_batch, 7}, + {"wk_market_facilitation_index_reset", (DL_FUNC)&wk_market_facilitation_index_reset, 1}, + {"wk_martin_ratio_new", (DL_FUNC)&wk_martin_ratio_new, 1}, + {"wk_martin_ratio_update", (DL_FUNC)&wk_martin_ratio_update, 2}, + {"wk_martin_ratio_batch", (DL_FUNC)&wk_martin_ratio_batch, 2}, + {"wk_martin_ratio_reset", (DL_FUNC)&wk_martin_ratio_reset, 1}, + {"wk_marubozu_new", (DL_FUNC)&wk_marubozu_new, 0}, + {"wk_marubozu_update", (DL_FUNC)&wk_marubozu_update, 7}, + {"wk_marubozu_batch", (DL_FUNC)&wk_marubozu_batch, 7}, + {"wk_marubozu_reset", (DL_FUNC)&wk_marubozu_reset, 1}, + {"wk_mass_index_new", (DL_FUNC)&wk_mass_index_new, 2}, + {"wk_mass_index_update", (DL_FUNC)&wk_mass_index_update, 7}, + {"wk_mass_index_batch", (DL_FUNC)&wk_mass_index_batch, 7}, + {"wk_mass_index_reset", (DL_FUNC)&wk_mass_index_reset, 1}, + {"wk_mat_hold_new", (DL_FUNC)&wk_mat_hold_new, 0}, + {"wk_mat_hold_update", (DL_FUNC)&wk_mat_hold_update, 7}, + {"wk_mat_hold_batch", (DL_FUNC)&wk_mat_hold_batch, 7}, + {"wk_mat_hold_reset", (DL_FUNC)&wk_mat_hold_reset, 1}, + {"wk_matching_low_new", (DL_FUNC)&wk_matching_low_new, 0}, + {"wk_matching_low_update", (DL_FUNC)&wk_matching_low_update, 7}, + {"wk_matching_low_batch", (DL_FUNC)&wk_matching_low_batch, 7}, + {"wk_matching_low_reset", (DL_FUNC)&wk_matching_low_reset, 1}, + {"wk_max_drawdown_new", (DL_FUNC)&wk_max_drawdown_new, 1}, + {"wk_max_drawdown_update", (DL_FUNC)&wk_max_drawdown_update, 2}, + {"wk_max_drawdown_batch", (DL_FUNC)&wk_max_drawdown_batch, 2}, + {"wk_max_drawdown_reset", (DL_FUNC)&wk_max_drawdown_reset, 1}, + {"wk_mc_clellan_oscillator_new", (DL_FUNC)&wk_mc_clellan_oscillator_new, 0}, + {"wk_mc_clellan_oscillator_update", (DL_FUNC)&wk_mc_clellan_oscillator_update, 8}, + {"wk_mc_clellan_oscillator_reset", (DL_FUNC)&wk_mc_clellan_oscillator_reset, 1}, + {"wk_mc_clellan_summation_index_new", (DL_FUNC)&wk_mc_clellan_summation_index_new, 0}, + {"wk_mc_clellan_summation_index_update", (DL_FUNC)&wk_mc_clellan_summation_index_update, 8}, + {"wk_mc_clellan_summation_index_reset", (DL_FUNC)&wk_mc_clellan_summation_index_reset, 1}, + {"wk_mc_ginley_dynamic_new", (DL_FUNC)&wk_mc_ginley_dynamic_new, 1}, + {"wk_mc_ginley_dynamic_update", (DL_FUNC)&wk_mc_ginley_dynamic_update, 2}, + {"wk_mc_ginley_dynamic_batch", (DL_FUNC)&wk_mc_ginley_dynamic_batch, 2}, + {"wk_mc_ginley_dynamic_reset", (DL_FUNC)&wk_mc_ginley_dynamic_reset, 1}, + {"wk_median_absolute_deviation_new", (DL_FUNC)&wk_median_absolute_deviation_new, 1}, + {"wk_median_absolute_deviation_update", (DL_FUNC)&wk_median_absolute_deviation_update, 2}, + {"wk_median_absolute_deviation_batch", (DL_FUNC)&wk_median_absolute_deviation_batch, 2}, + {"wk_median_absolute_deviation_reset", (DL_FUNC)&wk_median_absolute_deviation_reset, 1}, + {"wk_median_channel_new", (DL_FUNC)&wk_median_channel_new, 2}, + {"wk_median_channel_update", (DL_FUNC)&wk_median_channel_update, 2}, + {"wk_median_channel_reset", (DL_FUNC)&wk_median_channel_reset, 1}, + {"wk_median_ma_new", (DL_FUNC)&wk_median_ma_new, 1}, + {"wk_median_ma_update", (DL_FUNC)&wk_median_ma_update, 2}, + {"wk_median_ma_batch", (DL_FUNC)&wk_median_ma_batch, 2}, + {"wk_median_ma_reset", (DL_FUNC)&wk_median_ma_reset, 1}, + {"wk_median_price_new", (DL_FUNC)&wk_median_price_new, 0}, + {"wk_median_price_update", (DL_FUNC)&wk_median_price_update, 7}, + {"wk_median_price_batch", (DL_FUNC)&wk_median_price_batch, 7}, + {"wk_median_price_reset", (DL_FUNC)&wk_median_price_reset, 1}, + {"wk_mfi_new", (DL_FUNC)&wk_mfi_new, 1}, + {"wk_mfi_update", (DL_FUNC)&wk_mfi_update, 7}, + {"wk_mfi_batch", (DL_FUNC)&wk_mfi_batch, 7}, + {"wk_mfi_reset", (DL_FUNC)&wk_mfi_reset, 1}, + {"wk_microprice_new", (DL_FUNC)&wk_microprice_new, 0}, + {"wk_microprice_update", (DL_FUNC)&wk_microprice_update, 5}, + {"wk_microprice_reset", (DL_FUNC)&wk_microprice_reset, 1}, + {"wk_mid_point_new", (DL_FUNC)&wk_mid_point_new, 1}, + {"wk_mid_point_update", (DL_FUNC)&wk_mid_point_update, 2}, + {"wk_mid_point_batch", (DL_FUNC)&wk_mid_point_batch, 2}, + {"wk_mid_point_reset", (DL_FUNC)&wk_mid_point_reset, 1}, + {"wk_mid_price_new", (DL_FUNC)&wk_mid_price_new, 1}, + {"wk_mid_price_update", (DL_FUNC)&wk_mid_price_update, 7}, + {"wk_mid_price_batch", (DL_FUNC)&wk_mid_price_batch, 7}, + {"wk_mid_price_reset", (DL_FUNC)&wk_mid_price_reset, 1}, + {"wk_minus_di_new", (DL_FUNC)&wk_minus_di_new, 1}, + {"wk_minus_di_update", (DL_FUNC)&wk_minus_di_update, 7}, + {"wk_minus_di_batch", (DL_FUNC)&wk_minus_di_batch, 7}, + {"wk_minus_di_reset", (DL_FUNC)&wk_minus_di_reset, 1}, + {"wk_minus_dm_new", (DL_FUNC)&wk_minus_dm_new, 1}, + {"wk_minus_dm_update", (DL_FUNC)&wk_minus_dm_update, 7}, + {"wk_minus_dm_batch", (DL_FUNC)&wk_minus_dm_batch, 7}, + {"wk_minus_dm_reset", (DL_FUNC)&wk_minus_dm_reset, 1}, + {"wk_modified_ma_stop_new", (DL_FUNC)&wk_modified_ma_stop_new, 1}, + {"wk_modified_ma_stop_update", (DL_FUNC)&wk_modified_ma_stop_update, 7}, + {"wk_modified_ma_stop_reset", (DL_FUNC)&wk_modified_ma_stop_reset, 1}, + {"wk_mom_new", (DL_FUNC)&wk_mom_new, 1}, + {"wk_mom_update", (DL_FUNC)&wk_mom_update, 2}, + {"wk_mom_batch", (DL_FUNC)&wk_mom_batch, 2}, + {"wk_mom_reset", (DL_FUNC)&wk_mom_reset, 1}, + {"wk_morning_doji_star_new", (DL_FUNC)&wk_morning_doji_star_new, 0}, + {"wk_morning_doji_star_update", (DL_FUNC)&wk_morning_doji_star_update, 7}, + {"wk_morning_doji_star_batch", (DL_FUNC)&wk_morning_doji_star_batch, 7}, + {"wk_morning_doji_star_reset", (DL_FUNC)&wk_morning_doji_star_reset, 1}, + {"wk_morning_evening_star_new", (DL_FUNC)&wk_morning_evening_star_new, 0}, + {"wk_morning_evening_star_update", (DL_FUNC)&wk_morning_evening_star_update, 7}, + {"wk_morning_evening_star_batch", (DL_FUNC)&wk_morning_evening_star_batch, 7}, + {"wk_morning_evening_star_reset", (DL_FUNC)&wk_morning_evening_star_reset, 1}, + {"wk_murrey_math_lines_new", (DL_FUNC)&wk_murrey_math_lines_new, 1}, + {"wk_murrey_math_lines_update", (DL_FUNC)&wk_murrey_math_lines_update, 7}, + {"wk_murrey_math_lines_reset", (DL_FUNC)&wk_murrey_math_lines_reset, 1}, + {"wk_naked_poc_new", (DL_FUNC)&wk_naked_poc_new, 2}, + {"wk_naked_poc_update", (DL_FUNC)&wk_naked_poc_update, 7}, + {"wk_naked_poc_batch", (DL_FUNC)&wk_naked_poc_batch, 7}, + {"wk_naked_poc_reset", (DL_FUNC)&wk_naked_poc_reset, 1}, + {"wk_natr_new", (DL_FUNC)&wk_natr_new, 1}, + {"wk_natr_update", (DL_FUNC)&wk_natr_update, 7}, + {"wk_natr_batch", (DL_FUNC)&wk_natr_batch, 7}, + {"wk_natr_reset", (DL_FUNC)&wk_natr_reset, 1}, + {"wk_new_highs_new_lows_new", (DL_FUNC)&wk_new_highs_new_lows_new, 0}, + {"wk_new_highs_new_lows_update", (DL_FUNC)&wk_new_highs_new_lows_update, 8}, + {"wk_new_highs_new_lows_reset", (DL_FUNC)&wk_new_highs_new_lows_reset, 1}, + {"wk_new_price_lines_new", (DL_FUNC)&wk_new_price_lines_new, 1}, + {"wk_new_price_lines_update", (DL_FUNC)&wk_new_price_lines_update, 7}, + {"wk_new_price_lines_batch", (DL_FUNC)&wk_new_price_lines_batch, 7}, + {"wk_new_price_lines_reset", (DL_FUNC)&wk_new_price_lines_reset, 1}, + {"wk_nrtr_new", (DL_FUNC)&wk_nrtr_new, 1}, + {"wk_nrtr_update", (DL_FUNC)&wk_nrtr_update, 7}, + {"wk_nrtr_reset", (DL_FUNC)&wk_nrtr_reset, 1}, + {"wk_nvi_new", (DL_FUNC)&wk_nvi_new, 0}, + {"wk_nvi_update", (DL_FUNC)&wk_nvi_update, 7}, + {"wk_nvi_batch", (DL_FUNC)&wk_nvi_batch, 7}, + {"wk_nvi_reset", (DL_FUNC)&wk_nvi_reset, 1}, + {"wk_obv_new", (DL_FUNC)&wk_obv_new, 0}, + {"wk_obv_update", (DL_FUNC)&wk_obv_update, 7}, + {"wk_obv_batch", (DL_FUNC)&wk_obv_batch, 7}, + {"wk_obv_reset", (DL_FUNC)&wk_obv_reset, 1}, + {"wk_oi_price_divergence_new", (DL_FUNC)&wk_oi_price_divergence_new, 1}, + {"wk_oi_price_divergence_update", (DL_FUNC)&wk_oi_price_divergence_update, 13}, + {"wk_oi_price_divergence_reset", (DL_FUNC)&wk_oi_price_divergence_reset, 1}, + {"wk_oi_to_volume_ratio_new", (DL_FUNC)&wk_oi_to_volume_ratio_new, 0}, + {"wk_oi_to_volume_ratio_update", (DL_FUNC)&wk_oi_to_volume_ratio_update, 13}, + {"wk_oi_to_volume_ratio_reset", (DL_FUNC)&wk_oi_to_volume_ratio_reset, 1}, + {"wk_oi_weighted_new", (DL_FUNC)&wk_oi_weighted_new, 0}, + {"wk_oi_weighted_update", (DL_FUNC)&wk_oi_weighted_update, 13}, + {"wk_oi_weighted_reset", (DL_FUNC)&wk_oi_weighted_reset, 1}, + {"wk_omega_ratio_new", (DL_FUNC)&wk_omega_ratio_new, 2}, + {"wk_omega_ratio_update", (DL_FUNC)&wk_omega_ratio_update, 2}, + {"wk_omega_ratio_batch", (DL_FUNC)&wk_omega_ratio_batch, 2}, + {"wk_omega_ratio_reset", (DL_FUNC)&wk_omega_ratio_reset, 1}, + {"wk_on_neck_new", (DL_FUNC)&wk_on_neck_new, 0}, + {"wk_on_neck_update", (DL_FUNC)&wk_on_neck_update, 7}, + {"wk_on_neck_batch", (DL_FUNC)&wk_on_neck_batch, 7}, + {"wk_on_neck_reset", (DL_FUNC)&wk_on_neck_reset, 1}, + {"wk_open_interest_delta_new", (DL_FUNC)&wk_open_interest_delta_new, 0}, + {"wk_open_interest_delta_update", (DL_FUNC)&wk_open_interest_delta_update, 13}, + {"wk_open_interest_delta_reset", (DL_FUNC)&wk_open_interest_delta_reset, 1}, + {"wk_open_interest_momentum_new", (DL_FUNC)&wk_open_interest_momentum_new, 1}, + {"wk_open_interest_momentum_update", (DL_FUNC)&wk_open_interest_momentum_update, 13}, + {"wk_open_interest_momentum_reset", (DL_FUNC)&wk_open_interest_momentum_reset, 1}, + {"wk_opening_marubozu_new", (DL_FUNC)&wk_opening_marubozu_new, 0}, + {"wk_opening_marubozu_update", (DL_FUNC)&wk_opening_marubozu_update, 7}, + {"wk_opening_marubozu_batch", (DL_FUNC)&wk_opening_marubozu_batch, 7}, + {"wk_opening_marubozu_reset", (DL_FUNC)&wk_opening_marubozu_reset, 1}, + {"wk_opening_range_new", (DL_FUNC)&wk_opening_range_new, 1}, + {"wk_opening_range_update", (DL_FUNC)&wk_opening_range_update, 7}, + {"wk_opening_range_reset", (DL_FUNC)&wk_opening_range_reset, 1}, + {"wk_order_book_imbalance_full_new", (DL_FUNC)&wk_order_book_imbalance_full_new, 0}, + {"wk_order_book_imbalance_full_update", (DL_FUNC)&wk_order_book_imbalance_full_update, 5}, + {"wk_order_book_imbalance_full_reset", (DL_FUNC)&wk_order_book_imbalance_full_reset, 1}, + {"wk_order_book_imbalance_top1_new", (DL_FUNC)&wk_order_book_imbalance_top1_new, 0}, + {"wk_order_book_imbalance_top1_update", (DL_FUNC)&wk_order_book_imbalance_top1_update, 5}, + {"wk_order_book_imbalance_top1_reset", (DL_FUNC)&wk_order_book_imbalance_top1_reset, 1}, + {"wk_order_book_imbalance_top_n_new", (DL_FUNC)&wk_order_book_imbalance_top_n_new, 1}, + {"wk_order_book_imbalance_top_n_update", (DL_FUNC)&wk_order_book_imbalance_top_n_update, 5}, + {"wk_order_book_imbalance_top_n_reset", (DL_FUNC)&wk_order_book_imbalance_top_n_reset, 1}, + {"wk_order_flow_imbalance_new", (DL_FUNC)&wk_order_flow_imbalance_new, 1}, + {"wk_order_flow_imbalance_update", (DL_FUNC)&wk_order_flow_imbalance_update, 5}, + {"wk_order_flow_imbalance_reset", (DL_FUNC)&wk_order_flow_imbalance_reset, 1}, + {"wk_ou_half_life_new", (DL_FUNC)&wk_ou_half_life_new, 1}, + {"wk_ou_half_life_update", (DL_FUNC)&wk_ou_half_life_update, 3}, + {"wk_ou_half_life_batch", (DL_FUNC)&wk_ou_half_life_batch, 3}, + {"wk_ou_half_life_reset", (DL_FUNC)&wk_ou_half_life_reset, 1}, + {"wk_overnight_gap_new", (DL_FUNC)&wk_overnight_gap_new, 1}, + {"wk_overnight_gap_update", (DL_FUNC)&wk_overnight_gap_update, 7}, + {"wk_overnight_gap_batch", (DL_FUNC)&wk_overnight_gap_batch, 7}, + {"wk_overnight_gap_reset", (DL_FUNC)&wk_overnight_gap_reset, 1}, + {"wk_overnight_intraday_return_new", (DL_FUNC)&wk_overnight_intraday_return_new, 1}, + {"wk_overnight_intraday_return_update", (DL_FUNC)&wk_overnight_intraday_return_update, 7}, + {"wk_overnight_intraday_return_reset", (DL_FUNC)&wk_overnight_intraday_return_reset, 1}, + {"wk_pain_index_new", (DL_FUNC)&wk_pain_index_new, 1}, + {"wk_pain_index_update", (DL_FUNC)&wk_pain_index_update, 2}, + {"wk_pain_index_batch", (DL_FUNC)&wk_pain_index_batch, 2}, + {"wk_pain_index_reset", (DL_FUNC)&wk_pain_index_reset, 1}, + {"wk_pair_spread_z_score_new", (DL_FUNC)&wk_pair_spread_z_score_new, 2}, + {"wk_pair_spread_z_score_update", (DL_FUNC)&wk_pair_spread_z_score_update, 3}, + {"wk_pair_spread_z_score_batch", (DL_FUNC)&wk_pair_spread_z_score_batch, 3}, + {"wk_pair_spread_z_score_reset", (DL_FUNC)&wk_pair_spread_z_score_reset, 1}, + {"wk_pairwise_beta_new", (DL_FUNC)&wk_pairwise_beta_new, 1}, + {"wk_pairwise_beta_update", (DL_FUNC)&wk_pairwise_beta_update, 3}, + {"wk_pairwise_beta_batch", (DL_FUNC)&wk_pairwise_beta_batch, 3}, + {"wk_pairwise_beta_reset", (DL_FUNC)&wk_pairwise_beta_reset, 1}, + {"wk_parkinson_volatility_new", (DL_FUNC)&wk_parkinson_volatility_new, 2}, + {"wk_parkinson_volatility_update", (DL_FUNC)&wk_parkinson_volatility_update, 7}, + {"wk_parkinson_volatility_batch", (DL_FUNC)&wk_parkinson_volatility_batch, 7}, + {"wk_parkinson_volatility_reset", (DL_FUNC)&wk_parkinson_volatility_reset, 1}, + {"wk_pearson_correlation_new", (DL_FUNC)&wk_pearson_correlation_new, 1}, + {"wk_pearson_correlation_update", (DL_FUNC)&wk_pearson_correlation_update, 3}, + {"wk_pearson_correlation_batch", (DL_FUNC)&wk_pearson_correlation_batch, 3}, + {"wk_pearson_correlation_reset", (DL_FUNC)&wk_pearson_correlation_reset, 1}, + {"wk_percent_above_ma_new", (DL_FUNC)&wk_percent_above_ma_new, 0}, + {"wk_percent_above_ma_update", (DL_FUNC)&wk_percent_above_ma_update, 8}, + {"wk_percent_above_ma_reset", (DL_FUNC)&wk_percent_above_ma_reset, 1}, + {"wk_percent_b_new", (DL_FUNC)&wk_percent_b_new, 2}, + {"wk_percent_b_update", (DL_FUNC)&wk_percent_b_update, 2}, + {"wk_percent_b_batch", (DL_FUNC)&wk_percent_b_batch, 2}, + {"wk_percent_b_reset", (DL_FUNC)&wk_percent_b_reset, 1}, + {"wk_percentage_trailing_stop_new", (DL_FUNC)&wk_percentage_trailing_stop_new, 1}, + {"wk_percentage_trailing_stop_update", (DL_FUNC)&wk_percentage_trailing_stop_update, 2}, + {"wk_percentage_trailing_stop_batch", (DL_FUNC)&wk_percentage_trailing_stop_batch, 2}, + {"wk_percentage_trailing_stop_reset", (DL_FUNC)&wk_percentage_trailing_stop_reset, 1}, + {"wk_perpetual_premium_index_new", (DL_FUNC)&wk_perpetual_premium_index_new, 0}, + {"wk_perpetual_premium_index_update", (DL_FUNC)&wk_perpetual_premium_index_update, 13}, + {"wk_perpetual_premium_index_reset", (DL_FUNC)&wk_perpetual_premium_index_reset, 1}, + {"wk_pgo_new", (DL_FUNC)&wk_pgo_new, 1}, + {"wk_pgo_update", (DL_FUNC)&wk_pgo_update, 7}, + {"wk_pgo_batch", (DL_FUNC)&wk_pgo_batch, 7}, + {"wk_pgo_reset", (DL_FUNC)&wk_pgo_reset, 1}, + {"wk_piercing_dark_cloud_new", (DL_FUNC)&wk_piercing_dark_cloud_new, 0}, + {"wk_piercing_dark_cloud_update", (DL_FUNC)&wk_piercing_dark_cloud_update, 7}, + {"wk_piercing_dark_cloud_batch", (DL_FUNC)&wk_piercing_dark_cloud_batch, 7}, + {"wk_piercing_dark_cloud_reset", (DL_FUNC)&wk_piercing_dark_cloud_reset, 1}, + {"wk_pin_new", (DL_FUNC)&wk_pin_new, 1}, + {"wk_pin_update", (DL_FUNC)&wk_pin_update, 5}, + {"wk_pin_reset", (DL_FUNC)&wk_pin_reset, 1}, + {"wk_pivot_reversal_new", (DL_FUNC)&wk_pivot_reversal_new, 2}, + {"wk_pivot_reversal_update", (DL_FUNC)&wk_pivot_reversal_update, 7}, + {"wk_pivot_reversal_batch", (DL_FUNC)&wk_pivot_reversal_batch, 7}, + {"wk_pivot_reversal_reset", (DL_FUNC)&wk_pivot_reversal_reset, 1}, + {"wk_plus_di_new", (DL_FUNC)&wk_plus_di_new, 1}, + {"wk_plus_di_update", (DL_FUNC)&wk_plus_di_update, 7}, + {"wk_plus_di_batch", (DL_FUNC)&wk_plus_di_batch, 7}, + {"wk_plus_di_reset", (DL_FUNC)&wk_plus_di_reset, 1}, + {"wk_plus_dm_new", (DL_FUNC)&wk_plus_dm_new, 1}, + {"wk_plus_dm_update", (DL_FUNC)&wk_plus_dm_update, 7}, + {"wk_plus_dm_batch", (DL_FUNC)&wk_plus_dm_batch, 7}, + {"wk_plus_dm_reset", (DL_FUNC)&wk_plus_dm_reset, 1}, + {"wk_pmo_new", (DL_FUNC)&wk_pmo_new, 2}, + {"wk_pmo_update", (DL_FUNC)&wk_pmo_update, 2}, + {"wk_pmo_batch", (DL_FUNC)&wk_pmo_batch, 2}, + {"wk_pmo_reset", (DL_FUNC)&wk_pmo_reset, 1}, + {"wk_point_and_figure_bars_new", (DL_FUNC)&wk_point_and_figure_bars_new, 2}, + {"wk_point_and_figure_bars_update", (DL_FUNC)&wk_point_and_figure_bars_update, 7}, + {"wk_point_and_figure_bars_reset", (DL_FUNC)&wk_point_and_figure_bars_reset, 1}, + {"wk_polarized_fractal_efficiency_new", (DL_FUNC)&wk_polarized_fractal_efficiency_new, 2}, + {"wk_polarized_fractal_efficiency_update", (DL_FUNC)&wk_polarized_fractal_efficiency_update, 2}, + {"wk_polarized_fractal_efficiency_batch", (DL_FUNC)&wk_polarized_fractal_efficiency_batch, 2}, + {"wk_polarized_fractal_efficiency_reset", (DL_FUNC)&wk_polarized_fractal_efficiency_reset, 1}, + {"wk_ppo_new", (DL_FUNC)&wk_ppo_new, 2}, + {"wk_ppo_update", (DL_FUNC)&wk_ppo_update, 2}, + {"wk_ppo_batch", (DL_FUNC)&wk_ppo_batch, 2}, + {"wk_ppo_reset", (DL_FUNC)&wk_ppo_reset, 1}, + {"wk_ppo_histogram_new", (DL_FUNC)&wk_ppo_histogram_new, 3}, + {"wk_ppo_histogram_update", (DL_FUNC)&wk_ppo_histogram_update, 2}, + {"wk_ppo_histogram_batch", (DL_FUNC)&wk_ppo_histogram_batch, 2}, + {"wk_ppo_histogram_reset", (DL_FUNC)&wk_ppo_histogram_reset, 1}, + {"wk_profile_shape_new", (DL_FUNC)&wk_profile_shape_new, 2}, + {"wk_profile_shape_update", (DL_FUNC)&wk_profile_shape_update, 7}, + {"wk_profile_shape_batch", (DL_FUNC)&wk_profile_shape_batch, 7}, + {"wk_profile_shape_reset", (DL_FUNC)&wk_profile_shape_reset, 1}, + {"wk_profit_factor_new", (DL_FUNC)&wk_profit_factor_new, 1}, + {"wk_profit_factor_update", (DL_FUNC)&wk_profit_factor_update, 2}, + {"wk_profit_factor_batch", (DL_FUNC)&wk_profit_factor_batch, 2}, + {"wk_profit_factor_reset", (DL_FUNC)&wk_profit_factor_reset, 1}, + {"wk_projection_bands_new", (DL_FUNC)&wk_projection_bands_new, 1}, + {"wk_projection_bands_update", (DL_FUNC)&wk_projection_bands_update, 7}, + {"wk_projection_bands_reset", (DL_FUNC)&wk_projection_bands_reset, 1}, + {"wk_projection_oscillator_new", (DL_FUNC)&wk_projection_oscillator_new, 1}, + {"wk_projection_oscillator_update", (DL_FUNC)&wk_projection_oscillator_update, 7}, + {"wk_projection_oscillator_batch", (DL_FUNC)&wk_projection_oscillator_batch, 7}, + {"wk_projection_oscillator_reset", (DL_FUNC)&wk_projection_oscillator_reset, 1}, + {"wk_psar_new", (DL_FUNC)&wk_psar_new, 3}, + {"wk_psar_update", (DL_FUNC)&wk_psar_update, 7}, + {"wk_psar_batch", (DL_FUNC)&wk_psar_batch, 7}, + {"wk_psar_reset", (DL_FUNC)&wk_psar_reset, 1}, + {"wk_pvi_new", (DL_FUNC)&wk_pvi_new, 0}, + {"wk_pvi_update", (DL_FUNC)&wk_pvi_update, 7}, + {"wk_pvi_batch", (DL_FUNC)&wk_pvi_batch, 7}, + {"wk_pvi_reset", (DL_FUNC)&wk_pvi_reset, 1}, + {"wk_qqe_new", (DL_FUNC)&wk_qqe_new, 3}, + {"wk_qqe_update", (DL_FUNC)&wk_qqe_update, 2}, + {"wk_qqe_reset", (DL_FUNC)&wk_qqe_reset, 1}, + {"wk_qstick_new", (DL_FUNC)&wk_qstick_new, 1}, + {"wk_qstick_update", (DL_FUNC)&wk_qstick_update, 7}, + {"wk_qstick_batch", (DL_FUNC)&wk_qstick_batch, 7}, + {"wk_qstick_reset", (DL_FUNC)&wk_qstick_reset, 1}, + {"wk_quartile_bands_new", (DL_FUNC)&wk_quartile_bands_new, 1}, + {"wk_quartile_bands_update", (DL_FUNC)&wk_quartile_bands_update, 2}, + {"wk_quartile_bands_reset", (DL_FUNC)&wk_quartile_bands_reset, 1}, + {"wk_quoted_spread_new", (DL_FUNC)&wk_quoted_spread_new, 0}, + {"wk_quoted_spread_update", (DL_FUNC)&wk_quoted_spread_update, 5}, + {"wk_quoted_spread_reset", (DL_FUNC)&wk_quoted_spread_reset, 1}, + {"wk_r_squared_new", (DL_FUNC)&wk_r_squared_new, 1}, + {"wk_r_squared_update", (DL_FUNC)&wk_r_squared_update, 2}, + {"wk_r_squared_batch", (DL_FUNC)&wk_r_squared_batch, 2}, + {"wk_r_squared_reset", (DL_FUNC)&wk_r_squared_reset, 1}, + {"wk_range_bars_new", (DL_FUNC)&wk_range_bars_new, 1}, + {"wk_range_bars_update", (DL_FUNC)&wk_range_bars_update, 7}, + {"wk_range_bars_reset", (DL_FUNC)&wk_range_bars_reset, 1}, + {"wk_realized_spread_new", (DL_FUNC)&wk_realized_spread_new, 1}, + {"wk_realized_spread_update", (DL_FUNC)&wk_realized_spread_update, 6}, + {"wk_realized_spread_reset", (DL_FUNC)&wk_realized_spread_reset, 1}, + {"wk_realized_volatility_new", (DL_FUNC)&wk_realized_volatility_new, 1}, + {"wk_realized_volatility_update", (DL_FUNC)&wk_realized_volatility_update, 2}, + {"wk_realized_volatility_batch", (DL_FUNC)&wk_realized_volatility_batch, 2}, + {"wk_realized_volatility_reset", (DL_FUNC)&wk_realized_volatility_reset, 1}, + {"wk_recovery_factor_new", (DL_FUNC)&wk_recovery_factor_new, 0}, + {"wk_recovery_factor_update", (DL_FUNC)&wk_recovery_factor_update, 2}, + {"wk_recovery_factor_batch", (DL_FUNC)&wk_recovery_factor_batch, 2}, + {"wk_recovery_factor_reset", (DL_FUNC)&wk_recovery_factor_reset, 1}, + {"wk_rectangle_range_new", (DL_FUNC)&wk_rectangle_range_new, 0}, + {"wk_rectangle_range_update", (DL_FUNC)&wk_rectangle_range_update, 7}, + {"wk_rectangle_range_batch", (DL_FUNC)&wk_rectangle_range_batch, 7}, + {"wk_rectangle_range_reset", (DL_FUNC)&wk_rectangle_range_reset, 1}, + {"wk_reflex_new", (DL_FUNC)&wk_reflex_new, 1}, + {"wk_reflex_update", (DL_FUNC)&wk_reflex_update, 2}, + {"wk_reflex_batch", (DL_FUNC)&wk_reflex_batch, 2}, + {"wk_reflex_reset", (DL_FUNC)&wk_reflex_reset, 1}, + {"wk_regime_label_new", (DL_FUNC)&wk_regime_label_new, 2}, + {"wk_regime_label_update", (DL_FUNC)&wk_regime_label_update, 2}, + {"wk_regime_label_batch", (DL_FUNC)&wk_regime_label_batch, 2}, + {"wk_regime_label_reset", (DL_FUNC)&wk_regime_label_reset, 1}, + {"wk_relative_strength_ab_new", (DL_FUNC)&wk_relative_strength_ab_new, 2}, + {"wk_relative_strength_ab_update", (DL_FUNC)&wk_relative_strength_ab_update, 3}, + {"wk_relative_strength_ab_reset", (DL_FUNC)&wk_relative_strength_ab_reset, 1}, + {"wk_renko_bars_new", (DL_FUNC)&wk_renko_bars_new, 1}, + {"wk_renko_bars_update", (DL_FUNC)&wk_renko_bars_update, 7}, + {"wk_renko_bars_reset", (DL_FUNC)&wk_renko_bars_reset, 1}, + {"wk_renko_trailing_stop_new", (DL_FUNC)&wk_renko_trailing_stop_new, 1}, + {"wk_renko_trailing_stop_update", (DL_FUNC)&wk_renko_trailing_stop_update, 2}, + {"wk_renko_trailing_stop_batch", (DL_FUNC)&wk_renko_trailing_stop_batch, 2}, + {"wk_renko_trailing_stop_reset", (DL_FUNC)&wk_renko_trailing_stop_reset, 1}, + {"wk_rickshaw_man_new", (DL_FUNC)&wk_rickshaw_man_new, 0}, + {"wk_rickshaw_man_update", (DL_FUNC)&wk_rickshaw_man_update, 7}, + {"wk_rickshaw_man_batch", (DL_FUNC)&wk_rickshaw_man_batch, 7}, + {"wk_rickshaw_man_reset", (DL_FUNC)&wk_rickshaw_man_reset, 1}, + {"wk_rising_three_methods_new", (DL_FUNC)&wk_rising_three_methods_new, 0}, + {"wk_rising_three_methods_update", (DL_FUNC)&wk_rising_three_methods_update, 7}, + {"wk_rising_three_methods_batch", (DL_FUNC)&wk_rising_three_methods_batch, 7}, + {"wk_rising_three_methods_reset", (DL_FUNC)&wk_rising_three_methods_reset, 1}, + {"wk_rmi_new", (DL_FUNC)&wk_rmi_new, 2}, + {"wk_rmi_update", (DL_FUNC)&wk_rmi_update, 2}, + {"wk_rmi_batch", (DL_FUNC)&wk_rmi_batch, 2}, + {"wk_rmi_reset", (DL_FUNC)&wk_rmi_reset, 1}, + {"wk_roc_new", (DL_FUNC)&wk_roc_new, 1}, + {"wk_roc_update", (DL_FUNC)&wk_roc_update, 2}, + {"wk_roc_batch", (DL_FUNC)&wk_roc_batch, 2}, + {"wk_roc_reset", (DL_FUNC)&wk_roc_reset, 1}, + {"wk_rocp_new", (DL_FUNC)&wk_rocp_new, 1}, + {"wk_rocp_update", (DL_FUNC)&wk_rocp_update, 2}, + {"wk_rocp_batch", (DL_FUNC)&wk_rocp_batch, 2}, + {"wk_rocp_reset", (DL_FUNC)&wk_rocp_reset, 1}, + {"wk_rocr_new", (DL_FUNC)&wk_rocr_new, 1}, + {"wk_rocr_update", (DL_FUNC)&wk_rocr_update, 2}, + {"wk_rocr_batch", (DL_FUNC)&wk_rocr_batch, 2}, + {"wk_rocr_reset", (DL_FUNC)&wk_rocr_reset, 1}, + {"wk_rocr100_new", (DL_FUNC)&wk_rocr100_new, 1}, + {"wk_rocr100_update", (DL_FUNC)&wk_rocr100_update, 2}, + {"wk_rocr100_batch", (DL_FUNC)&wk_rocr100_batch, 2}, + {"wk_rocr100_reset", (DL_FUNC)&wk_rocr100_reset, 1}, + {"wk_rogers_satchell_volatility_new", (DL_FUNC)&wk_rogers_satchell_volatility_new, 2}, + {"wk_rogers_satchell_volatility_update", (DL_FUNC)&wk_rogers_satchell_volatility_update, 7}, + {"wk_rogers_satchell_volatility_batch", (DL_FUNC)&wk_rogers_satchell_volatility_batch, 7}, + {"wk_rogers_satchell_volatility_reset", (DL_FUNC)&wk_rogers_satchell_volatility_reset, 1}, + {"wk_roll_measure_new", (DL_FUNC)&wk_roll_measure_new, 1}, + {"wk_roll_measure_update", (DL_FUNC)&wk_roll_measure_update, 5}, + {"wk_roll_measure_reset", (DL_FUNC)&wk_roll_measure_reset, 1}, + {"wk_rolling_correlation_new", (DL_FUNC)&wk_rolling_correlation_new, 1}, + {"wk_rolling_correlation_update", (DL_FUNC)&wk_rolling_correlation_update, 3}, + {"wk_rolling_correlation_batch", (DL_FUNC)&wk_rolling_correlation_batch, 3}, + {"wk_rolling_correlation_reset", (DL_FUNC)&wk_rolling_correlation_reset, 1}, + {"wk_rolling_covariance_new", (DL_FUNC)&wk_rolling_covariance_new, 1}, + {"wk_rolling_covariance_update", (DL_FUNC)&wk_rolling_covariance_update, 3}, + {"wk_rolling_covariance_batch", (DL_FUNC)&wk_rolling_covariance_batch, 3}, + {"wk_rolling_covariance_reset", (DL_FUNC)&wk_rolling_covariance_reset, 1}, + {"wk_rolling_iqr_new", (DL_FUNC)&wk_rolling_iqr_new, 1}, + {"wk_rolling_iqr_update", (DL_FUNC)&wk_rolling_iqr_update, 2}, + {"wk_rolling_iqr_batch", (DL_FUNC)&wk_rolling_iqr_batch, 2}, + {"wk_rolling_iqr_reset", (DL_FUNC)&wk_rolling_iqr_reset, 1}, + {"wk_rolling_min_max_scaler_new", (DL_FUNC)&wk_rolling_min_max_scaler_new, 1}, + {"wk_rolling_min_max_scaler_update", (DL_FUNC)&wk_rolling_min_max_scaler_update, 2}, + {"wk_rolling_min_max_scaler_batch", (DL_FUNC)&wk_rolling_min_max_scaler_batch, 2}, + {"wk_rolling_min_max_scaler_reset", (DL_FUNC)&wk_rolling_min_max_scaler_reset, 1}, + {"wk_rolling_percentile_rank_new", (DL_FUNC)&wk_rolling_percentile_rank_new, 1}, + {"wk_rolling_percentile_rank_update", (DL_FUNC)&wk_rolling_percentile_rank_update, 2}, + {"wk_rolling_percentile_rank_batch", (DL_FUNC)&wk_rolling_percentile_rank_batch, 2}, + {"wk_rolling_percentile_rank_reset", (DL_FUNC)&wk_rolling_percentile_rank_reset, 1}, + {"wk_rolling_quantile_new", (DL_FUNC)&wk_rolling_quantile_new, 2}, + {"wk_rolling_quantile_update", (DL_FUNC)&wk_rolling_quantile_update, 2}, + {"wk_rolling_quantile_batch", (DL_FUNC)&wk_rolling_quantile_batch, 2}, + {"wk_rolling_quantile_reset", (DL_FUNC)&wk_rolling_quantile_reset, 1}, + {"wk_rolling_vwap_new", (DL_FUNC)&wk_rolling_vwap_new, 1}, + {"wk_rolling_vwap_update", (DL_FUNC)&wk_rolling_vwap_update, 7}, + {"wk_rolling_vwap_batch", (DL_FUNC)&wk_rolling_vwap_batch, 7}, + {"wk_rolling_vwap_reset", (DL_FUNC)&wk_rolling_vwap_reset, 1}, + {"wk_roofing_filter_new", (DL_FUNC)&wk_roofing_filter_new, 2}, + {"wk_roofing_filter_update", (DL_FUNC)&wk_roofing_filter_update, 2}, + {"wk_roofing_filter_batch", (DL_FUNC)&wk_roofing_filter_batch, 2}, + {"wk_roofing_filter_reset", (DL_FUNC)&wk_roofing_filter_reset, 1}, + {"wk_rsi_new", (DL_FUNC)&wk_rsi_new, 1}, + {"wk_rsi_update", (DL_FUNC)&wk_rsi_update, 2}, + {"wk_rsi_batch", (DL_FUNC)&wk_rsi_batch, 2}, + {"wk_rsi_reset", (DL_FUNC)&wk_rsi_reset, 1}, + {"wk_rsx_new", (DL_FUNC)&wk_rsx_new, 1}, + {"wk_rsx_update", (DL_FUNC)&wk_rsx_update, 2}, + {"wk_rsx_batch", (DL_FUNC)&wk_rsx_batch, 2}, + {"wk_rsx_reset", (DL_FUNC)&wk_rsx_reset, 1}, + {"wk_run_bars_new", (DL_FUNC)&wk_run_bars_new, 1}, + {"wk_run_bars_update", (DL_FUNC)&wk_run_bars_update, 7}, + {"wk_run_bars_reset", (DL_FUNC)&wk_run_bars_reset, 1}, + {"wk_rvi_new", (DL_FUNC)&wk_rvi_new, 1}, + {"wk_rvi_update", (DL_FUNC)&wk_rvi_update, 7}, + {"wk_rvi_batch", (DL_FUNC)&wk_rvi_batch, 7}, + {"wk_rvi_reset", (DL_FUNC)&wk_rvi_reset, 1}, + {"wk_rvi_volatility_new", (DL_FUNC)&wk_rvi_volatility_new, 1}, + {"wk_rvi_volatility_update", (DL_FUNC)&wk_rvi_volatility_update, 2}, + {"wk_rvi_volatility_batch", (DL_FUNC)&wk_rvi_volatility_batch, 2}, + {"wk_rvi_volatility_reset", (DL_FUNC)&wk_rvi_volatility_reset, 1}, + {"wk_rwi_new", (DL_FUNC)&wk_rwi_new, 1}, + {"wk_rwi_update", (DL_FUNC)&wk_rwi_update, 7}, + {"wk_rwi_reset", (DL_FUNC)&wk_rwi_reset, 1}, + {"wk_sample_entropy_new", (DL_FUNC)&wk_sample_entropy_new, 3}, + {"wk_sample_entropy_update", (DL_FUNC)&wk_sample_entropy_update, 2}, + {"wk_sample_entropy_batch", (DL_FUNC)&wk_sample_entropy_batch, 2}, + {"wk_sample_entropy_reset", (DL_FUNC)&wk_sample_entropy_reset, 1}, + {"wk_sar_ext_new", (DL_FUNC)&wk_sar_ext_new, 8}, + {"wk_sar_ext_update", (DL_FUNC)&wk_sar_ext_update, 7}, + {"wk_sar_ext_batch", (DL_FUNC)&wk_sar_ext_batch, 7}, + {"wk_sar_ext_reset", (DL_FUNC)&wk_sar_ext_reset, 1}, + {"wk_seasonal_z_score_new", (DL_FUNC)&wk_seasonal_z_score_new, 1}, + {"wk_seasonal_z_score_update", (DL_FUNC)&wk_seasonal_z_score_update, 7}, + {"wk_seasonal_z_score_batch", (DL_FUNC)&wk_seasonal_z_score_batch, 7}, + {"wk_seasonal_z_score_reset", (DL_FUNC)&wk_seasonal_z_score_reset, 1}, + {"wk_separating_lines_new", (DL_FUNC)&wk_separating_lines_new, 0}, + {"wk_separating_lines_update", (DL_FUNC)&wk_separating_lines_update, 7}, + {"wk_separating_lines_batch", (DL_FUNC)&wk_separating_lines_batch, 7}, + {"wk_separating_lines_reset", (DL_FUNC)&wk_separating_lines_reset, 1}, + {"wk_session_high_low_new", (DL_FUNC)&wk_session_high_low_new, 1}, + {"wk_session_high_low_update", (DL_FUNC)&wk_session_high_low_update, 7}, + {"wk_session_high_low_reset", (DL_FUNC)&wk_session_high_low_reset, 1}, + {"wk_session_range_new", (DL_FUNC)&wk_session_range_new, 1}, + {"wk_session_range_update", (DL_FUNC)&wk_session_range_update, 7}, + {"wk_session_range_reset", (DL_FUNC)&wk_session_range_reset, 1}, + {"wk_session_vwap_new", (DL_FUNC)&wk_session_vwap_new, 1}, + {"wk_session_vwap_update", (DL_FUNC)&wk_session_vwap_update, 7}, + {"wk_session_vwap_batch", (DL_FUNC)&wk_session_vwap_batch, 7}, + {"wk_session_vwap_reset", (DL_FUNC)&wk_session_vwap_reset, 1}, + {"wk_shannon_entropy_new", (DL_FUNC)&wk_shannon_entropy_new, 2}, + {"wk_shannon_entropy_update", (DL_FUNC)&wk_shannon_entropy_update, 2}, + {"wk_shannon_entropy_batch", (DL_FUNC)&wk_shannon_entropy_batch, 2}, + {"wk_shannon_entropy_reset", (DL_FUNC)&wk_shannon_entropy_reset, 1}, + {"wk_shark_new", (DL_FUNC)&wk_shark_new, 0}, + {"wk_shark_update", (DL_FUNC)&wk_shark_update, 7}, + {"wk_shark_batch", (DL_FUNC)&wk_shark_batch, 7}, + {"wk_shark_reset", (DL_FUNC)&wk_shark_reset, 1}, + {"wk_sharpe_ratio_new", (DL_FUNC)&wk_sharpe_ratio_new, 2}, + {"wk_sharpe_ratio_update", (DL_FUNC)&wk_sharpe_ratio_update, 2}, + {"wk_sharpe_ratio_batch", (DL_FUNC)&wk_sharpe_ratio_batch, 2}, + {"wk_sharpe_ratio_reset", (DL_FUNC)&wk_sharpe_ratio_reset, 1}, + {"wk_shooting_star_new", (DL_FUNC)&wk_shooting_star_new, 0}, + {"wk_shooting_star_update", (DL_FUNC)&wk_shooting_star_update, 7}, + {"wk_shooting_star_batch", (DL_FUNC)&wk_shooting_star_batch, 7}, + {"wk_shooting_star_reset", (DL_FUNC)&wk_shooting_star_reset, 1}, + {"wk_short_line_new", (DL_FUNC)&wk_short_line_new, 0}, + {"wk_short_line_update", (DL_FUNC)&wk_short_line_update, 7}, + {"wk_short_line_batch", (DL_FUNC)&wk_short_line_batch, 7}, + {"wk_short_line_reset", (DL_FUNC)&wk_short_line_reset, 1}, + {"wk_signed_volume_new", (DL_FUNC)&wk_signed_volume_new, 0}, + {"wk_signed_volume_update", (DL_FUNC)&wk_signed_volume_update, 5}, + {"wk_signed_volume_reset", (DL_FUNC)&wk_signed_volume_reset, 1}, + {"wk_sine_wave_new", (DL_FUNC)&wk_sine_wave_new, 0}, + {"wk_sine_wave_update", (DL_FUNC)&wk_sine_wave_update, 2}, + {"wk_sine_wave_batch", (DL_FUNC)&wk_sine_wave_batch, 2}, + {"wk_sine_wave_reset", (DL_FUNC)&wk_sine_wave_reset, 1}, + {"wk_sine_weighted_ma_new", (DL_FUNC)&wk_sine_weighted_ma_new, 1}, + {"wk_sine_weighted_ma_update", (DL_FUNC)&wk_sine_weighted_ma_update, 2}, + {"wk_sine_weighted_ma_batch", (DL_FUNC)&wk_sine_weighted_ma_batch, 2}, + {"wk_sine_weighted_ma_reset", (DL_FUNC)&wk_sine_weighted_ma_reset, 1}, + {"wk_single_prints_new", (DL_FUNC)&wk_single_prints_new, 2}, + {"wk_single_prints_update", (DL_FUNC)&wk_single_prints_update, 7}, + {"wk_single_prints_batch", (DL_FUNC)&wk_single_prints_batch, 7}, + {"wk_single_prints_reset", (DL_FUNC)&wk_single_prints_reset, 1}, + {"wk_skewness_new", (DL_FUNC)&wk_skewness_new, 1}, + {"wk_skewness_update", (DL_FUNC)&wk_skewness_update, 2}, + {"wk_skewness_batch", (DL_FUNC)&wk_skewness_batch, 2}, + {"wk_skewness_reset", (DL_FUNC)&wk_skewness_reset, 1}, + {"wk_sma_new", (DL_FUNC)&wk_sma_new, 1}, + {"wk_sma_update", (DL_FUNC)&wk_sma_update, 2}, + {"wk_sma_batch", (DL_FUNC)&wk_sma_batch, 2}, + {"wk_sma_reset", (DL_FUNC)&wk_sma_reset, 1}, + {"wk_smi_new", (DL_FUNC)&wk_smi_new, 3}, + {"wk_smi_update", (DL_FUNC)&wk_smi_update, 7}, + {"wk_smi_batch", (DL_FUNC)&wk_smi_batch, 7}, + {"wk_smi_reset", (DL_FUNC)&wk_smi_reset, 1}, + {"wk_smma_new", (DL_FUNC)&wk_smma_new, 1}, + {"wk_smma_update", (DL_FUNC)&wk_smma_update, 2}, + {"wk_smma_batch", (DL_FUNC)&wk_smma_batch, 2}, + {"wk_smma_reset", (DL_FUNC)&wk_smma_reset, 1}, + {"wk_smoothed_heikin_ashi_new", (DL_FUNC)&wk_smoothed_heikin_ashi_new, 1}, + {"wk_smoothed_heikin_ashi_update", (DL_FUNC)&wk_smoothed_heikin_ashi_update, 7}, + {"wk_smoothed_heikin_ashi_reset", (DL_FUNC)&wk_smoothed_heikin_ashi_reset, 1}, + {"wk_sortino_ratio_new", (DL_FUNC)&wk_sortino_ratio_new, 2}, + {"wk_sortino_ratio_update", (DL_FUNC)&wk_sortino_ratio_update, 2}, + {"wk_sortino_ratio_batch", (DL_FUNC)&wk_sortino_ratio_batch, 2}, + {"wk_sortino_ratio_reset", (DL_FUNC)&wk_sortino_ratio_reset, 1}, + {"wk_spearman_correlation_new", (DL_FUNC)&wk_spearman_correlation_new, 1}, + {"wk_spearman_correlation_update", (DL_FUNC)&wk_spearman_correlation_update, 3}, + {"wk_spearman_correlation_batch", (DL_FUNC)&wk_spearman_correlation_batch, 3}, + {"wk_spearman_correlation_reset", (DL_FUNC)&wk_spearman_correlation_reset, 1}, + {"wk_spinning_top_new", (DL_FUNC)&wk_spinning_top_new, 0}, + {"wk_spinning_top_update", (DL_FUNC)&wk_spinning_top_update, 7}, + {"wk_spinning_top_batch", (DL_FUNC)&wk_spinning_top_batch, 7}, + {"wk_spinning_top_reset", (DL_FUNC)&wk_spinning_top_reset, 1}, + {"wk_spread_ar1_coefficient_new", (DL_FUNC)&wk_spread_ar1_coefficient_new, 1}, + {"wk_spread_ar1_coefficient_update", (DL_FUNC)&wk_spread_ar1_coefficient_update, 3}, + {"wk_spread_ar1_coefficient_batch", (DL_FUNC)&wk_spread_ar1_coefficient_batch, 3}, + {"wk_spread_ar1_coefficient_reset", (DL_FUNC)&wk_spread_ar1_coefficient_reset, 1}, + {"wk_spread_bollinger_bands_new", (DL_FUNC)&wk_spread_bollinger_bands_new, 2}, + {"wk_spread_bollinger_bands_update", (DL_FUNC)&wk_spread_bollinger_bands_update, 3}, + {"wk_spread_bollinger_bands_reset", (DL_FUNC)&wk_spread_bollinger_bands_reset, 1}, + {"wk_spread_hurst_new", (DL_FUNC)&wk_spread_hurst_new, 1}, + {"wk_spread_hurst_update", (DL_FUNC)&wk_spread_hurst_update, 3}, + {"wk_spread_hurst_batch", (DL_FUNC)&wk_spread_hurst_batch, 3}, + {"wk_spread_hurst_reset", (DL_FUNC)&wk_spread_hurst_reset, 1}, + {"wk_stalled_pattern_new", (DL_FUNC)&wk_stalled_pattern_new, 0}, + {"wk_stalled_pattern_update", (DL_FUNC)&wk_stalled_pattern_update, 7}, + {"wk_stalled_pattern_batch", (DL_FUNC)&wk_stalled_pattern_batch, 7}, + {"wk_stalled_pattern_reset", (DL_FUNC)&wk_stalled_pattern_reset, 1}, + {"wk_standard_error_new", (DL_FUNC)&wk_standard_error_new, 1}, + {"wk_standard_error_update", (DL_FUNC)&wk_standard_error_update, 2}, + {"wk_standard_error_batch", (DL_FUNC)&wk_standard_error_batch, 2}, + {"wk_standard_error_reset", (DL_FUNC)&wk_standard_error_reset, 1}, + {"wk_standard_error_bands_new", (DL_FUNC)&wk_standard_error_bands_new, 2}, + {"wk_standard_error_bands_update", (DL_FUNC)&wk_standard_error_bands_update, 2}, + {"wk_standard_error_bands_reset", (DL_FUNC)&wk_standard_error_bands_reset, 1}, + {"wk_starc_bands_new", (DL_FUNC)&wk_starc_bands_new, 3}, + {"wk_starc_bands_update", (DL_FUNC)&wk_starc_bands_update, 7}, + {"wk_starc_bands_reset", (DL_FUNC)&wk_starc_bands_reset, 1}, + {"wk_stc_new", (DL_FUNC)&wk_stc_new, 4}, + {"wk_stc_update", (DL_FUNC)&wk_stc_update, 2}, + {"wk_stc_batch", (DL_FUNC)&wk_stc_batch, 2}, + {"wk_stc_reset", (DL_FUNC)&wk_stc_reset, 1}, + {"wk_std_dev_new", (DL_FUNC)&wk_std_dev_new, 1}, + {"wk_std_dev_update", (DL_FUNC)&wk_std_dev_update, 2}, + {"wk_std_dev_batch", (DL_FUNC)&wk_std_dev_batch, 2}, + {"wk_std_dev_reset", (DL_FUNC)&wk_std_dev_reset, 1}, + {"wk_step_trailing_stop_new", (DL_FUNC)&wk_step_trailing_stop_new, 1}, + {"wk_step_trailing_stop_update", (DL_FUNC)&wk_step_trailing_stop_update, 2}, + {"wk_step_trailing_stop_batch", (DL_FUNC)&wk_step_trailing_stop_batch, 2}, + {"wk_step_trailing_stop_reset", (DL_FUNC)&wk_step_trailing_stop_reset, 1}, + {"wk_sterling_ratio_new", (DL_FUNC)&wk_sterling_ratio_new, 1}, + {"wk_sterling_ratio_update", (DL_FUNC)&wk_sterling_ratio_update, 2}, + {"wk_sterling_ratio_batch", (DL_FUNC)&wk_sterling_ratio_batch, 2}, + {"wk_sterling_ratio_reset", (DL_FUNC)&wk_sterling_ratio_reset, 1}, + {"wk_stick_sandwich_new", (DL_FUNC)&wk_stick_sandwich_new, 0}, + {"wk_stick_sandwich_update", (DL_FUNC)&wk_stick_sandwich_update, 7}, + {"wk_stick_sandwich_batch", (DL_FUNC)&wk_stick_sandwich_batch, 7}, + {"wk_stick_sandwich_reset", (DL_FUNC)&wk_stick_sandwich_reset, 1}, + {"wk_stoch_rsi_new", (DL_FUNC)&wk_stoch_rsi_new, 2}, + {"wk_stoch_rsi_update", (DL_FUNC)&wk_stoch_rsi_update, 2}, + {"wk_stoch_rsi_batch", (DL_FUNC)&wk_stoch_rsi_batch, 2}, + {"wk_stoch_rsi_reset", (DL_FUNC)&wk_stoch_rsi_reset, 1}, + {"wk_stochastic_new", (DL_FUNC)&wk_stochastic_new, 2}, + {"wk_stochastic_update", (DL_FUNC)&wk_stochastic_update, 7}, + {"wk_stochastic_reset", (DL_FUNC)&wk_stochastic_reset, 1}, + {"wk_stochastic_cci_new", (DL_FUNC)&wk_stochastic_cci_new, 1}, + {"wk_stochastic_cci_update", (DL_FUNC)&wk_stochastic_cci_update, 7}, + {"wk_stochastic_cci_batch", (DL_FUNC)&wk_stochastic_cci_batch, 7}, + {"wk_stochastic_cci_reset", (DL_FUNC)&wk_stochastic_cci_reset, 1}, + {"wk_super_smoother_new", (DL_FUNC)&wk_super_smoother_new, 1}, + {"wk_super_smoother_update", (DL_FUNC)&wk_super_smoother_update, 2}, + {"wk_super_smoother_batch", (DL_FUNC)&wk_super_smoother_batch, 2}, + {"wk_super_smoother_reset", (DL_FUNC)&wk_super_smoother_reset, 1}, + {"wk_super_trend_new", (DL_FUNC)&wk_super_trend_new, 2}, + {"wk_super_trend_update", (DL_FUNC)&wk_super_trend_update, 7}, + {"wk_super_trend_reset", (DL_FUNC)&wk_super_trend_reset, 1}, + {"wk_t3_new", (DL_FUNC)&wk_t3_new, 2}, + {"wk_t3_update", (DL_FUNC)&wk_t3_update, 2}, + {"wk_t3_batch", (DL_FUNC)&wk_t3_batch, 2}, + {"wk_t3_reset", (DL_FUNC)&wk_t3_reset, 1}, + {"wk_tail_ratio_new", (DL_FUNC)&wk_tail_ratio_new, 1}, + {"wk_tail_ratio_update", (DL_FUNC)&wk_tail_ratio_update, 2}, + {"wk_tail_ratio_batch", (DL_FUNC)&wk_tail_ratio_batch, 2}, + {"wk_tail_ratio_reset", (DL_FUNC)&wk_tail_ratio_reset, 1}, + {"wk_taker_buy_sell_ratio_new", (DL_FUNC)&wk_taker_buy_sell_ratio_new, 0}, + {"wk_taker_buy_sell_ratio_update", (DL_FUNC)&wk_taker_buy_sell_ratio_update, 13}, + {"wk_taker_buy_sell_ratio_reset", (DL_FUNC)&wk_taker_buy_sell_ratio_reset, 1}, + {"wk_takuri_new", (DL_FUNC)&wk_takuri_new, 0}, + {"wk_takuri_update", (DL_FUNC)&wk_takuri_update, 7}, + {"wk_takuri_batch", (DL_FUNC)&wk_takuri_batch, 7}, + {"wk_takuri_reset", (DL_FUNC)&wk_takuri_reset, 1}, + {"wk_tasuki_gap_new", (DL_FUNC)&wk_tasuki_gap_new, 0}, + {"wk_tasuki_gap_update", (DL_FUNC)&wk_tasuki_gap_update, 7}, + {"wk_tasuki_gap_batch", (DL_FUNC)&wk_tasuki_gap_batch, 7}, + {"wk_tasuki_gap_reset", (DL_FUNC)&wk_tasuki_gap_reset, 1}, + {"wk_td_camouflage_new", (DL_FUNC)&wk_td_camouflage_new, 0}, + {"wk_td_camouflage_update", (DL_FUNC)&wk_td_camouflage_update, 7}, + {"wk_td_camouflage_batch", (DL_FUNC)&wk_td_camouflage_batch, 7}, + {"wk_td_camouflage_reset", (DL_FUNC)&wk_td_camouflage_reset, 1}, + {"wk_td_clop_new", (DL_FUNC)&wk_td_clop_new, 0}, + {"wk_td_clop_update", (DL_FUNC)&wk_td_clop_update, 7}, + {"wk_td_clop_batch", (DL_FUNC)&wk_td_clop_batch, 7}, + {"wk_td_clop_reset", (DL_FUNC)&wk_td_clop_reset, 1}, + {"wk_td_clopwin_new", (DL_FUNC)&wk_td_clopwin_new, 0}, + {"wk_td_clopwin_update", (DL_FUNC)&wk_td_clopwin_update, 7}, + {"wk_td_clopwin_batch", (DL_FUNC)&wk_td_clopwin_batch, 7}, + {"wk_td_clopwin_reset", (DL_FUNC)&wk_td_clopwin_reset, 1}, + {"wk_td_combo_new", (DL_FUNC)&wk_td_combo_new, 4}, + {"wk_td_combo_update", (DL_FUNC)&wk_td_combo_update, 7}, + {"wk_td_combo_batch", (DL_FUNC)&wk_td_combo_batch, 7}, + {"wk_td_combo_reset", (DL_FUNC)&wk_td_combo_reset, 1}, + {"wk_td_countdown_new", (DL_FUNC)&wk_td_countdown_new, 4}, + {"wk_td_countdown_update", (DL_FUNC)&wk_td_countdown_update, 7}, + {"wk_td_countdown_batch", (DL_FUNC)&wk_td_countdown_batch, 7}, + {"wk_td_countdown_reset", (DL_FUNC)&wk_td_countdown_reset, 1}, + {"wk_td_d_wave_new", (DL_FUNC)&wk_td_d_wave_new, 1}, + {"wk_td_d_wave_update", (DL_FUNC)&wk_td_d_wave_update, 7}, + {"wk_td_d_wave_batch", (DL_FUNC)&wk_td_d_wave_batch, 7}, + {"wk_td_d_wave_reset", (DL_FUNC)&wk_td_d_wave_reset, 1}, + {"wk_td_de_marker_new", (DL_FUNC)&wk_td_de_marker_new, 1}, + {"wk_td_de_marker_update", (DL_FUNC)&wk_td_de_marker_update, 7}, + {"wk_td_de_marker_batch", (DL_FUNC)&wk_td_de_marker_batch, 7}, + {"wk_td_de_marker_reset", (DL_FUNC)&wk_td_de_marker_reset, 1}, + {"wk_td_differential_new", (DL_FUNC)&wk_td_differential_new, 0}, + {"wk_td_differential_update", (DL_FUNC)&wk_td_differential_update, 7}, + {"wk_td_differential_batch", (DL_FUNC)&wk_td_differential_batch, 7}, + {"wk_td_differential_reset", (DL_FUNC)&wk_td_differential_reset, 1}, + {"wk_td_lines_new", (DL_FUNC)&wk_td_lines_new, 2}, + {"wk_td_lines_update", (DL_FUNC)&wk_td_lines_update, 7}, + {"wk_td_lines_reset", (DL_FUNC)&wk_td_lines_reset, 1}, + {"wk_td_moving_average_new", (DL_FUNC)&wk_td_moving_average_new, 2}, + {"wk_td_moving_average_update", (DL_FUNC)&wk_td_moving_average_update, 7}, + {"wk_td_moving_average_reset", (DL_FUNC)&wk_td_moving_average_reset, 1}, + {"wk_td_open_new", (DL_FUNC)&wk_td_open_new, 0}, + {"wk_td_open_update", (DL_FUNC)&wk_td_open_update, 7}, + {"wk_td_open_batch", (DL_FUNC)&wk_td_open_batch, 7}, + {"wk_td_open_reset", (DL_FUNC)&wk_td_open_reset, 1}, + {"wk_td_pressure_new", (DL_FUNC)&wk_td_pressure_new, 1}, + {"wk_td_pressure_update", (DL_FUNC)&wk_td_pressure_update, 7}, + {"wk_td_pressure_batch", (DL_FUNC)&wk_td_pressure_batch, 7}, + {"wk_td_pressure_reset", (DL_FUNC)&wk_td_pressure_reset, 1}, + {"wk_td_propulsion_new", (DL_FUNC)&wk_td_propulsion_new, 0}, + {"wk_td_propulsion_update", (DL_FUNC)&wk_td_propulsion_update, 7}, + {"wk_td_propulsion_batch", (DL_FUNC)&wk_td_propulsion_batch, 7}, + {"wk_td_propulsion_reset", (DL_FUNC)&wk_td_propulsion_reset, 1}, + {"wk_td_range_projection_new", (DL_FUNC)&wk_td_range_projection_new, 0}, + {"wk_td_range_projection_update", (DL_FUNC)&wk_td_range_projection_update, 7}, + {"wk_td_range_projection_reset", (DL_FUNC)&wk_td_range_projection_reset, 1}, + {"wk_td_rei_new", (DL_FUNC)&wk_td_rei_new, 1}, + {"wk_td_rei_update", (DL_FUNC)&wk_td_rei_update, 7}, + {"wk_td_rei_batch", (DL_FUNC)&wk_td_rei_batch, 7}, + {"wk_td_rei_reset", (DL_FUNC)&wk_td_rei_reset, 1}, + {"wk_td_risk_level_new", (DL_FUNC)&wk_td_risk_level_new, 2}, + {"wk_td_risk_level_update", (DL_FUNC)&wk_td_risk_level_update, 7}, + {"wk_td_risk_level_reset", (DL_FUNC)&wk_td_risk_level_reset, 1}, + {"wk_td_sequential_new", (DL_FUNC)&wk_td_sequential_new, 4}, + {"wk_td_sequential_update", (DL_FUNC)&wk_td_sequential_update, 7}, + {"wk_td_sequential_reset", (DL_FUNC)&wk_td_sequential_reset, 1}, + {"wk_td_setup_new", (DL_FUNC)&wk_td_setup_new, 2}, + {"wk_td_setup_update", (DL_FUNC)&wk_td_setup_update, 7}, + {"wk_td_setup_batch", (DL_FUNC)&wk_td_setup_batch, 7}, + {"wk_td_setup_reset", (DL_FUNC)&wk_td_setup_reset, 1}, + {"wk_td_trap_new", (DL_FUNC)&wk_td_trap_new, 0}, + {"wk_td_trap_update", (DL_FUNC)&wk_td_trap_update, 7}, + {"wk_td_trap_batch", (DL_FUNC)&wk_td_trap_batch, 7}, + {"wk_td_trap_reset", (DL_FUNC)&wk_td_trap_reset, 1}, + {"wk_tema_new", (DL_FUNC)&wk_tema_new, 1}, + {"wk_tema_update", (DL_FUNC)&wk_tema_update, 2}, + {"wk_tema_batch", (DL_FUNC)&wk_tema_batch, 2}, + {"wk_tema_reset", (DL_FUNC)&wk_tema_reset, 1}, + {"wk_term_structure_basis_new", (DL_FUNC)&wk_term_structure_basis_new, 0}, + {"wk_term_structure_basis_update", (DL_FUNC)&wk_term_structure_basis_update, 13}, + {"wk_term_structure_basis_reset", (DL_FUNC)&wk_term_structure_basis_reset, 1}, + {"wk_three_drives_new", (DL_FUNC)&wk_three_drives_new, 0}, + {"wk_three_drives_update", (DL_FUNC)&wk_three_drives_update, 7}, + {"wk_three_drives_batch", (DL_FUNC)&wk_three_drives_batch, 7}, + {"wk_three_drives_reset", (DL_FUNC)&wk_three_drives_reset, 1}, + {"wk_three_inside_new", (DL_FUNC)&wk_three_inside_new, 0}, + {"wk_three_inside_update", (DL_FUNC)&wk_three_inside_update, 7}, + {"wk_three_inside_batch", (DL_FUNC)&wk_three_inside_batch, 7}, + {"wk_three_inside_reset", (DL_FUNC)&wk_three_inside_reset, 1}, + {"wk_three_line_break_new", (DL_FUNC)&wk_three_line_break_new, 1}, + {"wk_three_line_break_update", (DL_FUNC)&wk_three_line_break_update, 7}, + {"wk_three_line_break_batch", (DL_FUNC)&wk_three_line_break_batch, 7}, + {"wk_three_line_break_reset", (DL_FUNC)&wk_three_line_break_reset, 1}, + {"wk_three_line_break_bars_new", (DL_FUNC)&wk_three_line_break_bars_new, 1}, + {"wk_three_line_break_bars_update", (DL_FUNC)&wk_three_line_break_bars_update, 7}, + {"wk_three_line_break_bars_reset", (DL_FUNC)&wk_three_line_break_bars_reset, 1}, + {"wk_three_line_strike_new", (DL_FUNC)&wk_three_line_strike_new, 0}, + {"wk_three_line_strike_update", (DL_FUNC)&wk_three_line_strike_update, 7}, + {"wk_three_line_strike_batch", (DL_FUNC)&wk_three_line_strike_batch, 7}, + {"wk_three_line_strike_reset", (DL_FUNC)&wk_three_line_strike_reset, 1}, + {"wk_three_outside_new", (DL_FUNC)&wk_three_outside_new, 0}, + {"wk_three_outside_update", (DL_FUNC)&wk_three_outside_update, 7}, + {"wk_three_outside_batch", (DL_FUNC)&wk_three_outside_batch, 7}, + {"wk_three_outside_reset", (DL_FUNC)&wk_three_outside_reset, 1}, + {"wk_three_soldiers_or_crows_new", (DL_FUNC)&wk_three_soldiers_or_crows_new, 0}, + {"wk_three_soldiers_or_crows_update", (DL_FUNC)&wk_three_soldiers_or_crows_update, 7}, + {"wk_three_soldiers_or_crows_batch", (DL_FUNC)&wk_three_soldiers_or_crows_batch, 7}, + {"wk_three_soldiers_or_crows_reset", (DL_FUNC)&wk_three_soldiers_or_crows_reset, 1}, + {"wk_three_stars_in_south_new", (DL_FUNC)&wk_three_stars_in_south_new, 0}, + {"wk_three_stars_in_south_update", (DL_FUNC)&wk_three_stars_in_south_update, 7}, + {"wk_three_stars_in_south_batch", (DL_FUNC)&wk_three_stars_in_south_batch, 7}, + {"wk_three_stars_in_south_reset", (DL_FUNC)&wk_three_stars_in_south_reset, 1}, + {"wk_thrusting_new", (DL_FUNC)&wk_thrusting_new, 0}, + {"wk_thrusting_update", (DL_FUNC)&wk_thrusting_update, 7}, + {"wk_thrusting_batch", (DL_FUNC)&wk_thrusting_batch, 7}, + {"wk_thrusting_reset", (DL_FUNC)&wk_thrusting_reset, 1}, + {"wk_tick_bars_new", (DL_FUNC)&wk_tick_bars_new, 1}, + {"wk_tick_bars_update", (DL_FUNC)&wk_tick_bars_update, 7}, + {"wk_tick_bars_reset", (DL_FUNC)&wk_tick_bars_reset, 1}, + {"wk_tick_index_new", (DL_FUNC)&wk_tick_index_new, 0}, + {"wk_tick_index_update", (DL_FUNC)&wk_tick_index_update, 8}, + {"wk_tick_index_reset", (DL_FUNC)&wk_tick_index_reset, 1}, + {"wk_tii_new", (DL_FUNC)&wk_tii_new, 2}, + {"wk_tii_update", (DL_FUNC)&wk_tii_update, 2}, + {"wk_tii_batch", (DL_FUNC)&wk_tii_batch, 2}, + {"wk_tii_reset", (DL_FUNC)&wk_tii_reset, 1}, + {"wk_time_based_stop_new", (DL_FUNC)&wk_time_based_stop_new, 1}, + {"wk_time_based_stop_update", (DL_FUNC)&wk_time_based_stop_update, 7}, + {"wk_time_based_stop_batch", (DL_FUNC)&wk_time_based_stop_batch, 7}, + {"wk_time_based_stop_reset", (DL_FUNC)&wk_time_based_stop_reset, 1}, + {"wk_time_of_day_return_profile_new", (DL_FUNC)&wk_time_of_day_return_profile_new, 2}, + {"wk_time_of_day_return_profile_update", (DL_FUNC)&wk_time_of_day_return_profile_update, 8}, + {"wk_time_of_day_return_profile_reset", (DL_FUNC)&wk_time_of_day_return_profile_reset, 1}, + {"wk_tower_top_bottom_new", (DL_FUNC)&wk_tower_top_bottom_new, 0}, + {"wk_tower_top_bottom_update", (DL_FUNC)&wk_tower_top_bottom_update, 7}, + {"wk_tower_top_bottom_batch", (DL_FUNC)&wk_tower_top_bottom_batch, 7}, + {"wk_tower_top_bottom_reset", (DL_FUNC)&wk_tower_top_bottom_reset, 1}, + {"wk_tpo_profile_new", (DL_FUNC)&wk_tpo_profile_new, 2}, + {"wk_tpo_profile_update", (DL_FUNC)&wk_tpo_profile_update, 8}, + {"wk_tpo_profile_reset", (DL_FUNC)&wk_tpo_profile_reset, 1}, + {"wk_trade_imbalance_new", (DL_FUNC)&wk_trade_imbalance_new, 1}, + {"wk_trade_imbalance_update", (DL_FUNC)&wk_trade_imbalance_update, 5}, + {"wk_trade_imbalance_reset", (DL_FUNC)&wk_trade_imbalance_reset, 1}, + {"wk_trade_sign_autocorrelation_new", (DL_FUNC)&wk_trade_sign_autocorrelation_new, 1}, + {"wk_trade_sign_autocorrelation_update", (DL_FUNC)&wk_trade_sign_autocorrelation_update, 5}, + {"wk_trade_sign_autocorrelation_reset", (DL_FUNC)&wk_trade_sign_autocorrelation_reset, 1}, + {"wk_trade_volume_index_new", (DL_FUNC)&wk_trade_volume_index_new, 1}, + {"wk_trade_volume_index_update", (DL_FUNC)&wk_trade_volume_index_update, 7}, + {"wk_trade_volume_index_batch", (DL_FUNC)&wk_trade_volume_index_batch, 7}, + {"wk_trade_volume_index_reset", (DL_FUNC)&wk_trade_volume_index_reset, 1}, + {"wk_trend_label_new", (DL_FUNC)&wk_trend_label_new, 1}, + {"wk_trend_label_update", (DL_FUNC)&wk_trend_label_update, 2}, + {"wk_trend_label_batch", (DL_FUNC)&wk_trend_label_batch, 2}, + {"wk_trend_label_reset", (DL_FUNC)&wk_trend_label_reset, 1}, + {"wk_trend_strength_index_new", (DL_FUNC)&wk_trend_strength_index_new, 1}, + {"wk_trend_strength_index_update", (DL_FUNC)&wk_trend_strength_index_update, 2}, + {"wk_trend_strength_index_batch", (DL_FUNC)&wk_trend_strength_index_batch, 2}, + {"wk_trend_strength_index_reset", (DL_FUNC)&wk_trend_strength_index_reset, 1}, + {"wk_trendflex_new", (DL_FUNC)&wk_trendflex_new, 1}, + {"wk_trendflex_update", (DL_FUNC)&wk_trendflex_update, 2}, + {"wk_trendflex_batch", (DL_FUNC)&wk_trendflex_batch, 2}, + {"wk_trendflex_reset", (DL_FUNC)&wk_trendflex_reset, 1}, + {"wk_treynor_ratio_new", (DL_FUNC)&wk_treynor_ratio_new, 2}, + {"wk_treynor_ratio_update", (DL_FUNC)&wk_treynor_ratio_update, 3}, + {"wk_treynor_ratio_batch", (DL_FUNC)&wk_treynor_ratio_batch, 3}, + {"wk_treynor_ratio_reset", (DL_FUNC)&wk_treynor_ratio_reset, 1}, + {"wk_triangle_new", (DL_FUNC)&wk_triangle_new, 0}, + {"wk_triangle_update", (DL_FUNC)&wk_triangle_update, 7}, + {"wk_triangle_batch", (DL_FUNC)&wk_triangle_batch, 7}, + {"wk_triangle_reset", (DL_FUNC)&wk_triangle_reset, 1}, + {"wk_trima_new", (DL_FUNC)&wk_trima_new, 1}, + {"wk_trima_update", (DL_FUNC)&wk_trima_update, 2}, + {"wk_trima_batch", (DL_FUNC)&wk_trima_batch, 2}, + {"wk_trima_reset", (DL_FUNC)&wk_trima_reset, 1}, + {"wk_trin_new", (DL_FUNC)&wk_trin_new, 0}, + {"wk_trin_update", (DL_FUNC)&wk_trin_update, 8}, + {"wk_trin_reset", (DL_FUNC)&wk_trin_reset, 1}, + {"wk_triple_top_bottom_new", (DL_FUNC)&wk_triple_top_bottom_new, 0}, + {"wk_triple_top_bottom_update", (DL_FUNC)&wk_triple_top_bottom_update, 7}, + {"wk_triple_top_bottom_batch", (DL_FUNC)&wk_triple_top_bottom_batch, 7}, + {"wk_triple_top_bottom_reset", (DL_FUNC)&wk_triple_top_bottom_reset, 1}, + {"wk_tristar_new", (DL_FUNC)&wk_tristar_new, 0}, + {"wk_tristar_update", (DL_FUNC)&wk_tristar_update, 7}, + {"wk_tristar_batch", (DL_FUNC)&wk_tristar_batch, 7}, + {"wk_tristar_reset", (DL_FUNC)&wk_tristar_reset, 1}, + {"wk_trix_new", (DL_FUNC)&wk_trix_new, 1}, + {"wk_trix_update", (DL_FUNC)&wk_trix_update, 2}, + {"wk_trix_batch", (DL_FUNC)&wk_trix_batch, 2}, + {"wk_trix_reset", (DL_FUNC)&wk_trix_reset, 1}, + {"wk_true_range_new", (DL_FUNC)&wk_true_range_new, 0}, + {"wk_true_range_update", (DL_FUNC)&wk_true_range_update, 7}, + {"wk_true_range_batch", (DL_FUNC)&wk_true_range_batch, 7}, + {"wk_true_range_reset", (DL_FUNC)&wk_true_range_reset, 1}, + {"wk_tsf_new", (DL_FUNC)&wk_tsf_new, 1}, + {"wk_tsf_update", (DL_FUNC)&wk_tsf_update, 2}, + {"wk_tsf_batch", (DL_FUNC)&wk_tsf_batch, 2}, + {"wk_tsf_reset", (DL_FUNC)&wk_tsf_reset, 1}, + {"wk_tsf_oscillator_new", (DL_FUNC)&wk_tsf_oscillator_new, 1}, + {"wk_tsf_oscillator_update", (DL_FUNC)&wk_tsf_oscillator_update, 2}, + {"wk_tsf_oscillator_batch", (DL_FUNC)&wk_tsf_oscillator_batch, 2}, + {"wk_tsf_oscillator_reset", (DL_FUNC)&wk_tsf_oscillator_reset, 1}, + {"wk_tsi_new", (DL_FUNC)&wk_tsi_new, 2}, + {"wk_tsi_update", (DL_FUNC)&wk_tsi_update, 2}, + {"wk_tsi_batch", (DL_FUNC)&wk_tsi_batch, 2}, + {"wk_tsi_reset", (DL_FUNC)&wk_tsi_reset, 1}, + {"wk_tsv_new", (DL_FUNC)&wk_tsv_new, 1}, + {"wk_tsv_update", (DL_FUNC)&wk_tsv_update, 7}, + {"wk_tsv_batch", (DL_FUNC)&wk_tsv_batch, 7}, + {"wk_tsv_reset", (DL_FUNC)&wk_tsv_reset, 1}, + {"wk_ttm_squeeze_new", (DL_FUNC)&wk_ttm_squeeze_new, 3}, + {"wk_ttm_squeeze_update", (DL_FUNC)&wk_ttm_squeeze_update, 7}, + {"wk_ttm_squeeze_reset", (DL_FUNC)&wk_ttm_squeeze_reset, 1}, + {"wk_ttm_trend_new", (DL_FUNC)&wk_ttm_trend_new, 1}, + {"wk_ttm_trend_update", (DL_FUNC)&wk_ttm_trend_update, 7}, + {"wk_ttm_trend_batch", (DL_FUNC)&wk_ttm_trend_batch, 7}, + {"wk_ttm_trend_reset", (DL_FUNC)&wk_ttm_trend_reset, 1}, + {"wk_turn_of_month_new", (DL_FUNC)&wk_turn_of_month_new, 3}, + {"wk_turn_of_month_update", (DL_FUNC)&wk_turn_of_month_update, 7}, + {"wk_turn_of_month_batch", (DL_FUNC)&wk_turn_of_month_batch, 7}, + {"wk_turn_of_month_reset", (DL_FUNC)&wk_turn_of_month_reset, 1}, + {"wk_tweezer_new", (DL_FUNC)&wk_tweezer_new, 0}, + {"wk_tweezer_update", (DL_FUNC)&wk_tweezer_update, 7}, + {"wk_tweezer_batch", (DL_FUNC)&wk_tweezer_batch, 7}, + {"wk_tweezer_reset", (DL_FUNC)&wk_tweezer_reset, 1}, + {"wk_twiggs_money_flow_new", (DL_FUNC)&wk_twiggs_money_flow_new, 1}, + {"wk_twiggs_money_flow_update", (DL_FUNC)&wk_twiggs_money_flow_update, 7}, + {"wk_twiggs_money_flow_batch", (DL_FUNC)&wk_twiggs_money_flow_batch, 7}, + {"wk_twiggs_money_flow_reset", (DL_FUNC)&wk_twiggs_money_flow_reset, 1}, + {"wk_two_crows_new", (DL_FUNC)&wk_two_crows_new, 0}, + {"wk_two_crows_update", (DL_FUNC)&wk_two_crows_update, 7}, + {"wk_two_crows_batch", (DL_FUNC)&wk_two_crows_batch, 7}, + {"wk_two_crows_reset", (DL_FUNC)&wk_two_crows_reset, 1}, + {"wk_typical_price_new", (DL_FUNC)&wk_typical_price_new, 0}, + {"wk_typical_price_update", (DL_FUNC)&wk_typical_price_update, 7}, + {"wk_typical_price_batch", (DL_FUNC)&wk_typical_price_batch, 7}, + {"wk_typical_price_reset", (DL_FUNC)&wk_typical_price_reset, 1}, + {"wk_ulcer_index_new", (DL_FUNC)&wk_ulcer_index_new, 1}, + {"wk_ulcer_index_update", (DL_FUNC)&wk_ulcer_index_update, 2}, + {"wk_ulcer_index_batch", (DL_FUNC)&wk_ulcer_index_batch, 2}, + {"wk_ulcer_index_reset", (DL_FUNC)&wk_ulcer_index_reset, 1}, + {"wk_ultimate_oscillator_new", (DL_FUNC)&wk_ultimate_oscillator_new, 3}, + {"wk_ultimate_oscillator_update", (DL_FUNC)&wk_ultimate_oscillator_update, 7}, + {"wk_ultimate_oscillator_batch", (DL_FUNC)&wk_ultimate_oscillator_batch, 7}, + {"wk_ultimate_oscillator_reset", (DL_FUNC)&wk_ultimate_oscillator_reset, 1}, + {"wk_unique_three_river_new", (DL_FUNC)&wk_unique_three_river_new, 0}, + {"wk_unique_three_river_update", (DL_FUNC)&wk_unique_three_river_update, 7}, + {"wk_unique_three_river_batch", (DL_FUNC)&wk_unique_three_river_batch, 7}, + {"wk_unique_three_river_reset", (DL_FUNC)&wk_unique_three_river_reset, 1}, + {"wk_universal_oscillator_new", (DL_FUNC)&wk_universal_oscillator_new, 1}, + {"wk_universal_oscillator_update", (DL_FUNC)&wk_universal_oscillator_update, 2}, + {"wk_universal_oscillator_batch", (DL_FUNC)&wk_universal_oscillator_batch, 2}, + {"wk_universal_oscillator_reset", (DL_FUNC)&wk_universal_oscillator_reset, 1}, + {"wk_up_down_volume_ratio_new", (DL_FUNC)&wk_up_down_volume_ratio_new, 0}, + {"wk_up_down_volume_ratio_update", (DL_FUNC)&wk_up_down_volume_ratio_update, 8}, + {"wk_up_down_volume_ratio_reset", (DL_FUNC)&wk_up_down_volume_ratio_reset, 1}, + {"wk_upside_gap_three_methods_new", (DL_FUNC)&wk_upside_gap_three_methods_new, 0}, + {"wk_upside_gap_three_methods_update", (DL_FUNC)&wk_upside_gap_three_methods_update, 7}, + {"wk_upside_gap_three_methods_batch", (DL_FUNC)&wk_upside_gap_three_methods_batch, 7}, + {"wk_upside_gap_three_methods_reset", (DL_FUNC)&wk_upside_gap_three_methods_reset, 1}, + {"wk_upside_gap_two_crows_new", (DL_FUNC)&wk_upside_gap_two_crows_new, 0}, + {"wk_upside_gap_two_crows_update", (DL_FUNC)&wk_upside_gap_two_crows_update, 7}, + {"wk_upside_gap_two_crows_batch", (DL_FUNC)&wk_upside_gap_two_crows_batch, 7}, + {"wk_upside_gap_two_crows_reset", (DL_FUNC)&wk_upside_gap_two_crows_reset, 1}, + {"wk_upside_potential_ratio_new", (DL_FUNC)&wk_upside_potential_ratio_new, 2}, + {"wk_upside_potential_ratio_update", (DL_FUNC)&wk_upside_potential_ratio_update, 2}, + {"wk_upside_potential_ratio_batch", (DL_FUNC)&wk_upside_potential_ratio_batch, 2}, + {"wk_upside_potential_ratio_reset", (DL_FUNC)&wk_upside_potential_ratio_reset, 1}, + {"wk_value_area_new", (DL_FUNC)&wk_value_area_new, 3}, + {"wk_value_area_update", (DL_FUNC)&wk_value_area_update, 7}, + {"wk_value_area_reset", (DL_FUNC)&wk_value_area_reset, 1}, + {"wk_value_at_risk_new", (DL_FUNC)&wk_value_at_risk_new, 2}, + {"wk_value_at_risk_update", (DL_FUNC)&wk_value_at_risk_update, 2}, + {"wk_value_at_risk_batch", (DL_FUNC)&wk_value_at_risk_batch, 2}, + {"wk_value_at_risk_reset", (DL_FUNC)&wk_value_at_risk_reset, 1}, + {"wk_variance_new", (DL_FUNC)&wk_variance_new, 1}, + {"wk_variance_update", (DL_FUNC)&wk_variance_update, 2}, + {"wk_variance_batch", (DL_FUNC)&wk_variance_batch, 2}, + {"wk_variance_reset", (DL_FUNC)&wk_variance_reset, 1}, + {"wk_variance_ratio_new", (DL_FUNC)&wk_variance_ratio_new, 2}, + {"wk_variance_ratio_update", (DL_FUNC)&wk_variance_ratio_update, 3}, + {"wk_variance_ratio_batch", (DL_FUNC)&wk_variance_ratio_batch, 3}, + {"wk_variance_ratio_reset", (DL_FUNC)&wk_variance_ratio_reset, 1}, + {"wk_vertical_horizontal_filter_new", (DL_FUNC)&wk_vertical_horizontal_filter_new, 1}, + {"wk_vertical_horizontal_filter_update", (DL_FUNC)&wk_vertical_horizontal_filter_update, 2}, + {"wk_vertical_horizontal_filter_batch", (DL_FUNC)&wk_vertical_horizontal_filter_batch, 2}, + {"wk_vertical_horizontal_filter_reset", (DL_FUNC)&wk_vertical_horizontal_filter_reset, 1}, + {"wk_vidya_new", (DL_FUNC)&wk_vidya_new, 2}, + {"wk_vidya_update", (DL_FUNC)&wk_vidya_update, 2}, + {"wk_vidya_batch", (DL_FUNC)&wk_vidya_batch, 2}, + {"wk_vidya_reset", (DL_FUNC)&wk_vidya_reset, 1}, + {"wk_volatility_cone_new", (DL_FUNC)&wk_volatility_cone_new, 2}, + {"wk_volatility_cone_update", (DL_FUNC)&wk_volatility_cone_update, 7}, + {"wk_volatility_cone_reset", (DL_FUNC)&wk_volatility_cone_reset, 1}, + {"wk_volatility_of_volatility_new", (DL_FUNC)&wk_volatility_of_volatility_new, 2}, + {"wk_volatility_of_volatility_update", (DL_FUNC)&wk_volatility_of_volatility_update, 2}, + {"wk_volatility_of_volatility_batch", (DL_FUNC)&wk_volatility_of_volatility_batch, 2}, + {"wk_volatility_of_volatility_reset", (DL_FUNC)&wk_volatility_of_volatility_reset, 1}, + {"wk_volatility_ratio_new", (DL_FUNC)&wk_volatility_ratio_new, 1}, + {"wk_volatility_ratio_update", (DL_FUNC)&wk_volatility_ratio_update, 7}, + {"wk_volatility_ratio_batch", (DL_FUNC)&wk_volatility_ratio_batch, 7}, + {"wk_volatility_ratio_reset", (DL_FUNC)&wk_volatility_ratio_reset, 1}, + {"wk_volty_stop_new", (DL_FUNC)&wk_volty_stop_new, 2}, + {"wk_volty_stop_update", (DL_FUNC)&wk_volty_stop_update, 7}, + {"wk_volty_stop_batch", (DL_FUNC)&wk_volty_stop_batch, 7}, + {"wk_volty_stop_reset", (DL_FUNC)&wk_volty_stop_reset, 1}, + {"wk_volume_bars_new", (DL_FUNC)&wk_volume_bars_new, 1}, + {"wk_volume_bars_update", (DL_FUNC)&wk_volume_bars_update, 7}, + {"wk_volume_bars_reset", (DL_FUNC)&wk_volume_bars_reset, 1}, + {"wk_volume_by_time_profile_new", (DL_FUNC)&wk_volume_by_time_profile_new, 2}, + {"wk_volume_by_time_profile_update", (DL_FUNC)&wk_volume_by_time_profile_update, 8}, + {"wk_volume_by_time_profile_reset", (DL_FUNC)&wk_volume_by_time_profile_reset, 1}, + {"wk_volume_oscillator_new", (DL_FUNC)&wk_volume_oscillator_new, 2}, + {"wk_volume_oscillator_update", (DL_FUNC)&wk_volume_oscillator_update, 7}, + {"wk_volume_oscillator_batch", (DL_FUNC)&wk_volume_oscillator_batch, 7}, + {"wk_volume_oscillator_reset", (DL_FUNC)&wk_volume_oscillator_reset, 1}, + {"wk_volume_price_trend_new", (DL_FUNC)&wk_volume_price_trend_new, 0}, + {"wk_volume_price_trend_update", (DL_FUNC)&wk_volume_price_trend_update, 7}, + {"wk_volume_price_trend_batch", (DL_FUNC)&wk_volume_price_trend_batch, 7}, + {"wk_volume_price_trend_reset", (DL_FUNC)&wk_volume_price_trend_reset, 1}, + {"wk_volume_profile_new", (DL_FUNC)&wk_volume_profile_new, 2}, + {"wk_volume_profile_update", (DL_FUNC)&wk_volume_profile_update, 8}, + {"wk_volume_profile_reset", (DL_FUNC)&wk_volume_profile_reset, 1}, + {"wk_volume_rsi_new", (DL_FUNC)&wk_volume_rsi_new, 1}, + {"wk_volume_rsi_update", (DL_FUNC)&wk_volume_rsi_update, 7}, + {"wk_volume_rsi_batch", (DL_FUNC)&wk_volume_rsi_batch, 7}, + {"wk_volume_rsi_reset", (DL_FUNC)&wk_volume_rsi_reset, 1}, + {"wk_volume_weighted_macd_new", (DL_FUNC)&wk_volume_weighted_macd_new, 3}, + {"wk_volume_weighted_macd_update", (DL_FUNC)&wk_volume_weighted_macd_update, 7}, + {"wk_volume_weighted_macd_reset", (DL_FUNC)&wk_volume_weighted_macd_reset, 1}, + {"wk_volume_weighted_sr_new", (DL_FUNC)&wk_volume_weighted_sr_new, 1}, + {"wk_volume_weighted_sr_update", (DL_FUNC)&wk_volume_weighted_sr_update, 7}, + {"wk_volume_weighted_sr_reset", (DL_FUNC)&wk_volume_weighted_sr_reset, 1}, + {"wk_vortex_new", (DL_FUNC)&wk_vortex_new, 1}, + {"wk_vortex_update", (DL_FUNC)&wk_vortex_update, 7}, + {"wk_vortex_reset", (DL_FUNC)&wk_vortex_reset, 1}, + {"wk_vpin_new", (DL_FUNC)&wk_vpin_new, 2}, + {"wk_vpin_update", (DL_FUNC)&wk_vpin_update, 5}, + {"wk_vpin_reset", (DL_FUNC)&wk_vpin_reset, 1}, + {"wk_vwap_new", (DL_FUNC)&wk_vwap_new, 0}, + {"wk_vwap_update", (DL_FUNC)&wk_vwap_update, 7}, + {"wk_vwap_batch", (DL_FUNC)&wk_vwap_batch, 7}, + {"wk_vwap_reset", (DL_FUNC)&wk_vwap_reset, 1}, + {"wk_vwap_std_dev_bands_new", (DL_FUNC)&wk_vwap_std_dev_bands_new, 1}, + {"wk_vwap_std_dev_bands_update", (DL_FUNC)&wk_vwap_std_dev_bands_update, 7}, + {"wk_vwap_std_dev_bands_reset", (DL_FUNC)&wk_vwap_std_dev_bands_reset, 1}, + {"wk_vwma_new", (DL_FUNC)&wk_vwma_new, 1}, + {"wk_vwma_update", (DL_FUNC)&wk_vwma_update, 7}, + {"wk_vwma_batch", (DL_FUNC)&wk_vwma_batch, 7}, + {"wk_vwma_reset", (DL_FUNC)&wk_vwma_reset, 1}, + {"wk_vzo_new", (DL_FUNC)&wk_vzo_new, 1}, + {"wk_vzo_update", (DL_FUNC)&wk_vzo_update, 7}, + {"wk_vzo_batch", (DL_FUNC)&wk_vzo_batch, 7}, + {"wk_vzo_reset", (DL_FUNC)&wk_vzo_reset, 1}, + {"wk_wad_new", (DL_FUNC)&wk_wad_new, 0}, + {"wk_wad_update", (DL_FUNC)&wk_wad_update, 7}, + {"wk_wad_batch", (DL_FUNC)&wk_wad_batch, 7}, + {"wk_wad_reset", (DL_FUNC)&wk_wad_reset, 1}, + {"wk_wave_pm_new", (DL_FUNC)&wk_wave_pm_new, 2}, + {"wk_wave_pm_update", (DL_FUNC)&wk_wave_pm_update, 2}, + {"wk_wave_pm_batch", (DL_FUNC)&wk_wave_pm_batch, 2}, + {"wk_wave_pm_reset", (DL_FUNC)&wk_wave_pm_reset, 1}, + {"wk_wave_trend_new", (DL_FUNC)&wk_wave_trend_new, 3}, + {"wk_wave_trend_update", (DL_FUNC)&wk_wave_trend_update, 7}, + {"wk_wave_trend_reset", (DL_FUNC)&wk_wave_trend_reset, 1}, + {"wk_wedge_new", (DL_FUNC)&wk_wedge_new, 0}, + {"wk_wedge_update", (DL_FUNC)&wk_wedge_update, 7}, + {"wk_wedge_batch", (DL_FUNC)&wk_wedge_batch, 7}, + {"wk_wedge_reset", (DL_FUNC)&wk_wedge_reset, 1}, + {"wk_weighted_close_new", (DL_FUNC)&wk_weighted_close_new, 0}, + {"wk_weighted_close_update", (DL_FUNC)&wk_weighted_close_update, 7}, + {"wk_weighted_close_batch", (DL_FUNC)&wk_weighted_close_batch, 7}, + {"wk_weighted_close_reset", (DL_FUNC)&wk_weighted_close_reset, 1}, + {"wk_wick_ratio_new", (DL_FUNC)&wk_wick_ratio_new, 0}, + {"wk_wick_ratio_update", (DL_FUNC)&wk_wick_ratio_update, 7}, + {"wk_wick_ratio_batch", (DL_FUNC)&wk_wick_ratio_batch, 7}, + {"wk_wick_ratio_reset", (DL_FUNC)&wk_wick_ratio_reset, 1}, + {"wk_williams_fractals_new", (DL_FUNC)&wk_williams_fractals_new, 0}, + {"wk_williams_fractals_update", (DL_FUNC)&wk_williams_fractals_update, 7}, + {"wk_williams_fractals_reset", (DL_FUNC)&wk_williams_fractals_reset, 1}, + {"wk_williams_r_new", (DL_FUNC)&wk_williams_r_new, 1}, + {"wk_williams_r_update", (DL_FUNC)&wk_williams_r_update, 7}, + {"wk_williams_r_batch", (DL_FUNC)&wk_williams_r_batch, 7}, + {"wk_williams_r_reset", (DL_FUNC)&wk_williams_r_reset, 1}, + {"wk_win_rate_new", (DL_FUNC)&wk_win_rate_new, 1}, + {"wk_win_rate_update", (DL_FUNC)&wk_win_rate_update, 2}, + {"wk_win_rate_batch", (DL_FUNC)&wk_win_rate_batch, 2}, + {"wk_win_rate_reset", (DL_FUNC)&wk_win_rate_reset, 1}, + {"wk_wma_new", (DL_FUNC)&wk_wma_new, 1}, + {"wk_wma_update", (DL_FUNC)&wk_wma_update, 2}, + {"wk_wma_batch", (DL_FUNC)&wk_wma_batch, 2}, + {"wk_wma_reset", (DL_FUNC)&wk_wma_reset, 1}, + {"wk_woodie_pivots_new", (DL_FUNC)&wk_woodie_pivots_new, 0}, + {"wk_woodie_pivots_update", (DL_FUNC)&wk_woodie_pivots_update, 7}, + {"wk_woodie_pivots_reset", (DL_FUNC)&wk_woodie_pivots_reset, 1}, + {"wk_yang_zhang_volatility_new", (DL_FUNC)&wk_yang_zhang_volatility_new, 2}, + {"wk_yang_zhang_volatility_update", (DL_FUNC)&wk_yang_zhang_volatility_update, 7}, + {"wk_yang_zhang_volatility_batch", (DL_FUNC)&wk_yang_zhang_volatility_batch, 7}, + {"wk_yang_zhang_volatility_reset", (DL_FUNC)&wk_yang_zhang_volatility_reset, 1}, + {"wk_yoyo_exit_new", (DL_FUNC)&wk_yoyo_exit_new, 2}, + {"wk_yoyo_exit_update", (DL_FUNC)&wk_yoyo_exit_update, 7}, + {"wk_yoyo_exit_batch", (DL_FUNC)&wk_yoyo_exit_batch, 7}, + {"wk_yoyo_exit_reset", (DL_FUNC)&wk_yoyo_exit_reset, 1}, + {"wk_z_score_new", (DL_FUNC)&wk_z_score_new, 1}, + {"wk_z_score_update", (DL_FUNC)&wk_z_score_update, 2}, + {"wk_z_score_batch", (DL_FUNC)&wk_z_score_batch, 2}, + {"wk_z_score_reset", (DL_FUNC)&wk_z_score_reset, 1}, + {"wk_zero_lag_macd_new", (DL_FUNC)&wk_zero_lag_macd_new, 3}, + {"wk_zero_lag_macd_update", (DL_FUNC)&wk_zero_lag_macd_update, 2}, + {"wk_zero_lag_macd_reset", (DL_FUNC)&wk_zero_lag_macd_reset, 1}, + {"wk_zig_zag_new", (DL_FUNC)&wk_zig_zag_new, 1}, + {"wk_zig_zag_update", (DL_FUNC)&wk_zig_zag_update, 7}, + {"wk_zig_zag_reset", (DL_FUNC)&wk_zig_zag_reset, 1}, + {"wk_zlema_new", (DL_FUNC)&wk_zlema_new, 1}, + {"wk_zlema_update", (DL_FUNC)&wk_zlema_update, 2}, + {"wk_zlema_batch", (DL_FUNC)&wk_zlema_batch, 2}, + {"wk_zlema_reset", (DL_FUNC)&wk_zlema_reset, 1}, + {NULL, NULL, 0} +}; + +void R_init_wickra(DllInfo *dll) { + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); + R_forceSymbols(dll, FALSE); +} diff --git a/bindings/r/tests/testthat.R b/bindings/r/tests/testthat.R new file mode 100644 index 00000000..57d715b1 --- /dev/null +++ b/bindings/r/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(wickra) + +test_check("wickra") diff --git a/bindings/r/tests/testthat/test-archetypes.R b/bindings/r/tests/testthat/test-archetypes.R new file mode 100644 index 00000000..b7b149a7 --- /dev/null +++ b/bindings/r/tests/testthat/test-archetypes.R @@ -0,0 +1,62 @@ +# One indicator per FFI archetype, exercised against the real native library. + +test_that("scalar update returns the textbook value", { + s <- Sma(3) + v <- NA_real_ + for (x in c(1, 2, 3, 4, 5)) v <- update(s, x) + expect_equal(v, 4) +}) + +test_that("batch matches streaming", { + input <- c(1, 2, 3, 4, 5, 6, 7, 8) + stream <- Sma(3) + want <- vapply(input, function(x) update(stream, x), numeric(1)) + got <- batch(Sma(3), input) + expect_equal(got, want) +}) + +test_that("multi-output returns a named vector, NA during warmup", { + m <- MacdIndicator(3, 6, 3) + out <- update(m, 100) + expect_true(all(is.na(out))) + for (i in 1:30) out <- update(m, 100 + i) + expect_false(any(is.na(out))) + expect_named(out, c("macd", "signal", "histogram")) +}) + +test_that("bar builders return a matrix of completed bars", { + rb <- RangeBars(2.0) + total <- 0 + for (p in c(100, 101, 103, 104, 99, 96, 102, 108, 95, 110)) { + total <- total + nrow(update(rb, p, p, p, p, 1, 0)) + } + expect_gt(total, 0) +}) + +test_that("profile indicators return scalars plus a values vector", { + vp <- VolumeProfile(10, 24) + snap <- NULL + for (i in 0:49) { + price <- 100 + 5 * sin(i * 0.3) + snap <- update(vp, price, price + 1, price - 1, price, 1000, i) + } + expect_false(is.null(snap)) + expect_gt(length(snap$values), 0) +}) + +test_that("array-input indicators consume vectors", { + ob <- OrderBookImbalanceFull() + v <- update(ob, c(99.9, 99.8, 99.7), c(5, 3, 2), c(100.1, 100.2, 100.3), c(1, 1, 1)) + expect_false(is.na(v)) +}) + +test_that("reset returns the indicator to warmup", { + s <- Sma(3) + for (x in c(1, 2, 3)) update(s, x) + reset(s) + expect_true(is.na(update(s, 10))) +}) + +test_that("invalid parameters raise an error", { + expect_error(Sma(0)) +}) diff --git a/bindings/wasm/README.md b/bindings/wasm/README.md index cdd1c484..7d803664 100644 --- a/bindings/wasm/README.md +++ b/bindings/wasm/README.md @@ -9,7 +9,7 @@ wickra-wasm` — pure WebAssembly, runs anywhere a modern JS engine does.** Wickra is a multi-language technical-analysis library with a Rust core and -bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go and any +bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading dashboards and historical backtests share the exact same implementation. This package is the WebAssembly binding diff --git a/docs/README.md b/docs/README.md index 908368a6..a9d25118 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,8 +9,9 @@ That includes: [Node](https://docs.wickra.org/Quickstart-Node), [WASM](https://docs.wickra.org/Quickstart-WASM), [C](https://docs.wickra.org/Quickstart-C), - [C#](https://docs.wickra.org/Quickstart-CSharp), and - [Go](https://docs.wickra.org/Quickstart-Go). + [C#](https://docs.wickra.org/Quickstart-CSharp), + [Go](https://docs.wickra.org/Quickstart-Go), and + [R](https://docs.wickra.org/Quickstart-R). - A per-indicator deep dive for every one of the **514 indicators** across the sixteen families (Moving Averages, Momentum Oscillators, Trend & Directional, Price Oscillators, Volatility & Bands, Bands & Channels, diff --git a/examples/README.md b/examples/README.md index 8f52547e..255deee3 100644 --- a/examples/README.md +++ b/examples/README.md @@ -91,6 +91,28 @@ The offline examples run on deterministic synthetic data (and under CI on all three OSes); `fetch_btcusdt` and `live_binance` reach the network and are built but not run in CI. +## R — `examples/r/` + +Build the C ABI library first (`cargo build -p wickra-c --release`) and install +the binding (see the [R binding README](../bindings/r)), then run any example +from this directory. + +| Example | What it does | Run | +| --- | --- | --- | +| `streaming.R` | Feed a synthetic price series through SMA / EMA / RSI / MACD tick by tick. | `Rscript streaming.R` | +| `backtest.R` | Basket of indicators over an OHLCV series (CSV arg or synthetic). | `Rscript backtest.R ` | +| `multi_timeframe.R` | Resample a 1-minute series to 5m / 15m and print an indicator per timeframe. | `Rscript multi_timeframe.R` | +| `parallel_assets.R` | SMA(20) batch over a panel, serial vs `mclapply`, with speedup. | `Rscript parallel_assets.R 200 5000` | +| `strategy_rsi_mean_reversion.R` | RSI(14) mean-reversion with PnL / Sharpe / max-DD summary. | `Rscript strategy_rsi_mean_reversion.R` | +| `strategy_macd_adx.R` | Trend-follower: MACD crossover entries gated by ADX(14) > 20. | `Rscript strategy_macd_adx.R` | +| `strategy_bollinger_squeeze.R` | Bollinger-squeeze breakout with an ATR(14) trailing stop. | `Rscript strategy_bollinger_squeeze.R` | +| `fetch_btcusdt.R` | Download real BTCUSDT klines from the Binance REST API into a CSV. | `Rscript fetch_btcusdt.R` | +| `live_binance.R` | Stream live Binance klines through EMA(20) over a WebSocket. | `Rscript live_binance.R` | + +The offline examples run on deterministic synthetic data (and under CI on all +three OSes); `fetch_btcusdt.R` and `live_binance.R` reach the network and are +parse-checked but not run in CI. + ## Python — `examples/python/` | Example | What it does | Run | diff --git a/examples/r/.gitignore b/examples/r/.gitignore new file mode 100644 index 00000000..6ae8a9c5 --- /dev/null +++ b/examples/r/.gitignore @@ -0,0 +1,3 @@ +# Data fetched at runtime by fetch_btcusdt.R +data/ +*.Rout diff --git a/examples/r/README.md b/examples/r/README.md new file mode 100644 index 00000000..a34aff8f --- /dev/null +++ b/examples/r/README.md @@ -0,0 +1,33 @@ +# Wickra examples — R + +Runnable R examples for the [Wickra R binding](../../bindings/r). Each example is +a small script; they share the deterministic synthetic data, CSV loader, and +equity summary in [`_common.R`](_common.R). + +Install the binding first (it compiles against the C ABI library — see the +[binding README](../../bindings/r)), then run any example from this directory: + +```bash +cargo build -p wickra-c --release +WICKRA_INCLUDE_DIR="$PWD/bindings/c/include" WICKRA_LIB_DIR="$PWD/target/release" \ + R CMD INSTALL bindings/r +cd examples/r +Rscript streaming.R +``` + +| Example | What it does | Run | +| --- | --- | --- | +| `streaming.R` | Feed a synthetic price series through SMA / EMA / RSI / MACD tick by tick. | `Rscript streaming.R` | +| `backtest.R` | Compute a basket of indicators over an OHLCV series and print a summary. | `Rscript backtest.R ` | +| `multi_timeframe.R` | Resample a 1-minute series into 5m / 15m and print an indicator per timeframe. | `Rscript multi_timeframe.R` | +| `parallel_assets.R` | SMA(20) batch over a panel, serial vs `mclapply`, with speedup. | `Rscript parallel_assets.R 200 5000` | +| `strategy_rsi_mean_reversion.R` | RSI(14) mean-reversion with a PnL / Sharpe / max-DD summary. | `Rscript strategy_rsi_mean_reversion.R` | +| `strategy_macd_adx.R` | MACD crossover entries gated by ADX(14) > 20. | `Rscript strategy_macd_adx.R` | +| `strategy_bollinger_squeeze.R` | Bollinger-squeeze breakout with an ATR(14) trailing stop. | `Rscript strategy_bollinger_squeeze.R` | +| `fetch_btcusdt.R` | Download real BTCUSDT klines from the Binance REST API into a CSV (`jsonlite`). | `Rscript fetch_btcusdt.R` | +| `live_binance.R` | Stream live Binance klines through EMA(20) over a WebSocket (`websocket`). | `Rscript live_binance.R` | + +`fetch_btcusdt.R` and `live_binance.R` require network access (and the +`jsonlite` / `websocket` packages); the rest run offline on deterministic +synthetic data. `parallel_assets.R` forks via `parallel::mclapply` on Unix and +runs serially on Windows. diff --git a/examples/r/_common.R b/examples/r/_common.R new file mode 100644 index 00000000..3c94576e --- /dev/null +++ b/examples/r/_common.R @@ -0,0 +1,54 @@ +# Shared helpers for the offline Wickra R examples: deterministic synthetic +# market data, a small OHLCV CSV loader, and an equity-curve summary. Mirrors the +# helpers used by the C, C# and Go example suites. + +synthetic_prices <- function(count, start = 100) { + i <- seq_len(count) - 1 + start + 12 * sin(i * 0.05) + 5 * sin(i * 0.013) + i * 0.01 +} + +synthetic_candles <- function(count, start_ts = 0, step_ms = 3600000) { + prices <- synthetic_prices(count + 1) + k <- seq_len(count) + i <- k - 1 + open <- prices[k] + close <- prices[k + 1] + data.frame( + open = open, + high = pmax(open, close) + 0.5 + abs(sin(i * 0.7)), + low = pmin(open, close) - 0.5 - abs(cos(i * 0.7)), + close = close, + volume = 1000 + 500 * (1 + sin(i * 0.1)), + timestamp = start_ts + i * step_ms + ) +} + +load_ohlcv_csv <- function(path) { + df <- utils::read.csv(path, header = TRUE, stringsAsFactors = FALSE) + if (ncol(df) >= 6) { + data.frame(open = df[[2]], high = df[[3]], low = df[[4]], + close = df[[5]], volume = df[[6]], timestamp = df[[1]]) + } else { + data.frame(open = df[[1]], high = df[[2]], low = df[[3]], + close = df[[4]], volume = df[[5]], timestamp = seq_len(nrow(df))) + } +} + +summarize_equity <- function(returns, trades, periods_per_year = 252) { + equity <- 1; peak <- 1; maxdd <- 0 + for (r in returns) { + equity <- equity * (1 + r) + peak <- max(peak, equity) + maxdd <- max(maxdd, (peak - equity) / peak) + } + mean_r <- if (length(returns)) mean(returns) else 0 + sd_r <- if (length(returns) > 1) stats::sd(returns) else 0 + sharpe <- if (sd_r > 1e-12) mean_r / sd_r * sqrt(periods_per_year) else 0 + list(total_return_pct = (equity - 1) * 100, sharpe = sharpe, + max_dd_pct = maxdd * 100, trades = trades) +} + +print_equity <- function(name, r) { + cat(sprintf("%-26s return=%8.2f%% sharpe=%6.2f maxDD=%6.2f%% trades=%d\n", + name, r$total_return_pct, r$sharpe, r$max_dd_pct, r$trades)) +} diff --git a/examples/r/backtest.R b/examples/r/backtest.R new file mode 100644 index 00000000..ecc77525 --- /dev/null +++ b/examples/r/backtest.R @@ -0,0 +1,28 @@ +# Compute a basket of indicators over an OHLCV series and print a summary. +# Pass a CSV path (timestamp,open,high,low,close,volume) or run on synthetic data. +library(wickra) +source("_common.R") + +args <- commandArgs(trailingOnly = TRUE) +if (length(args) >= 1) { + source_name <- args[1]; bars <- load_ohlcv_csv(args[1]) +} else { + source_name <- "synthetic"; bars <- synthetic_candles(1000) +} + +cat(sprintf("Backtest over %d bars (%s):\n", nrow(bars), source_name)) +sma <- Sma(20); ema <- Ema(50); rsi <- Rsi(14); atr <- Atr(14) +last_sma <- last_ema <- last_rsi <- last_atr <- NA_real_ +oversold <- 0L +for (i in seq_len(nrow(bars))) { + b <- bars[i, ] + last_sma <- update(sma, b$close) + last_ema <- update(ema, b$close) + last_rsi <- update(rsi, b$close) + last_atr <- update(atr, b$open, b$high, b$low, b$close, b$volume, b$timestamp) + if (is.finite(last_rsi) && last_rsi < 30) oversold <- oversold + 1L +} +cat(sprintf(" SMA(20) last = %.4f\n", last_sma)) +cat(sprintf(" EMA(50) last = %.4f\n", last_ema)) +cat(sprintf(" RSI(14) last = %.4f (%d oversold bars)\n", last_rsi, oversold)) +cat(sprintf(" ATR(14) last = %.4f\n", last_atr)) diff --git a/examples/r/fetch_btcusdt.R b/examples/r/fetch_btcusdt.R new file mode 100644 index 00000000..e37b72b3 --- /dev/null +++ b/examples/r/fetch_btcusdt.R @@ -0,0 +1,13 @@ +# Download real BTCUSDT hourly klines from the Binance REST API into a CSV that the +# other examples can consume. Requires network access and the 'jsonlite' package. +if (!requireNamespace("jsonlite", quietly = TRUE)) stop("install 'jsonlite' to run this example") +url <- "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1h&limit=500" +cat("Fetching", url, "\n") +klines <- jsonlite::fromJSON(url) +dir.create("data", showWarnings = FALSE) +df <- data.frame( + timestamp = as.numeric(klines[, 1]), open = klines[, 2], high = klines[, 3], + low = klines[, 4], close = klines[, 5], volume = klines[, 6] +) +utils::write.csv(df, "data/btcusdt_1h.csv", row.names = FALSE, quote = FALSE) +cat(sprintf("Wrote %d klines to data/btcusdt_1h.csv\n", nrow(df))) diff --git a/examples/r/live_binance.R b/examples/r/live_binance.R new file mode 100644 index 00000000..69587a22 --- /dev/null +++ b/examples/r/live_binance.R @@ -0,0 +1,17 @@ +# Stream live BTCUSDT 1-minute klines from Binance and feed each close through EMA(20). +# Requires network access and the 'websocket' + 'jsonlite' packages. Runs ~60s. +library(wickra) +for (p in c("websocket", "jsonlite", "later")) { + if (!requireNamespace(p, quietly = TRUE)) stop(sprintf("install '%s' to run this example", p)) +} +ema <- Ema(20) +ws <- websocket::WebSocket$new("wss://stream.binance.com:9443/ws/btcusdt@kline_1m") +ws$onOpen(function(event) cat("Connected; streaming for up to 60s...\n")) +ws$onMessage(function(event) { + msg <- jsonlite::fromJSON(event$data) + close <- as.numeric(msg$k$c) + cat(sprintf("close=%.2f EMA(20)=%.2f\n", close, update(ema, close))) +}) +ws$connect() +later::later(function() ws$close(), 60) +while (ws$readyState() <= 1L) later::run_now(timeout = 1) diff --git a/examples/r/multi_timeframe.R b/examples/r/multi_timeframe.R new file mode 100644 index 00000000..56da0776 --- /dev/null +++ b/examples/r/multi_timeframe.R @@ -0,0 +1,23 @@ +# Resample a 1-minute series into higher timeframes and run an indicator per timeframe. +library(wickra) +source("_common.R") + +resample <- function(bars, factor) { + if (factor <= 1) return(bars) + idx <- seq(1, nrow(bars), by = factor) + do.call(rbind, lapply(idx, function(i) { + j <- min(i + factor - 1, nrow(bars)) + data.frame(open = bars$open[i], high = max(bars$high[i:j]), + low = min(bars$low[i:j]), close = bars$close[j], + volume = sum(bars$volume[i:j]), timestamp = bars$timestamp[i]) + })) +} + +one_minute <- synthetic_candles(1200, step_ms = 60000) +cat("EMA(20) of close across timeframes (resampled from 1-minute bars):\n") +for (factor in c(1, 5, 15)) { + bars <- resample(one_minute, factor) + ema <- Ema(20); last <- NA_real_ + for (cl in bars$close) last <- update(ema, cl) + cat(sprintf(" %2dm: %5d bars EMA(20) last = %.4f\n", factor, nrow(bars), last)) +} diff --git a/examples/r/parallel_assets.R b/examples/r/parallel_assets.R new file mode 100644 index 00000000..6113b4b4 --- /dev/null +++ b/examples/r/parallel_assets.R @@ -0,0 +1,24 @@ +# Run SMA(20) batch over a panel of assets, serial vs parallel::mclapply, with +# the speedup. mclapply forks on Unix; on Windows it runs serially. +library(wickra) +source("_common.R") + +args <- commandArgs(trailingOnly = TRUE) +assets <- if (length(args) >= 1) as.integer(args[1]) else 200L +bars <- if (length(args) >= 2) as.integer(args[2]) else 5000L + +panel <- lapply(seq_len(assets), function(a) synthetic_prices(bars, start = 50 + a * 0.1)) +run_one <- function(p) { s <- Sma(20); r <- batch(s, p); r[length(r)] } + +t0 <- Sys.time(); invisible(vapply(panel, run_one, numeric(1))) +serial <- as.numeric(Sys.time() - t0, units = "secs") + +# mclapply forks on Unix; Windows has no fork, so it must run on a single core. +cores <- if (.Platform$OS.type == "windows") 1L else max(1L, parallel::detectCores()) +t0 <- Sys.time(); invisible(parallel::mclapply(panel, run_one, mc.cores = cores)) +par <- as.numeric(Sys.time() - t0, units = "secs") + +cat(sprintf("%d assets x %d bars, SMA(20) batch:\n", assets, bars)) +cat(sprintf(" serial %8.1f ms\n", serial * 1000)) +cat(sprintf(" parallel %8.1f ms (%.1fx speedup, %d cores)\n", + par * 1000, serial / max(par, 1e-9), cores)) diff --git a/examples/r/strategy_bollinger_squeeze.R b/examples/r/strategy_bollinger_squeeze.R new file mode 100644 index 00000000..f3742809 --- /dev/null +++ b/examples/r/strategy_bollinger_squeeze.R @@ -0,0 +1,24 @@ +# Breakout: when Bollinger bandwidth is tight (a "squeeze") and price closes above +# the upper band, go long with an ATR(14) trailing stop. +library(wickra) +source("_common.R") + +args <- commandArgs(trailingOnly = TRUE) +bars <- if (length(args) >= 1) load_ohlcv_csv(args[1]) else synthetic_candles(2000) + +bb <- BollingerBands(20, 2.0); atr <- Atr(14) +returns <- numeric(0); trades <- 0L; in_pos <- FALSE; entry <- 0; stop <- 0 +for (i in seq_len(nrow(bars))) { + b <- bars[i, ] + band <- update(bb, b$close) + atr_value <- update(atr, b$open, b$high, b$low, b$close, b$volume, b$timestamp) + if (is.na(band[["middle"]]) || !is.finite(atr_value)) next + bandwidth <- if (band[["middle"]] != 0) (band[["upper"]] - band[["lower"]]) / band[["middle"]] else .Machine$double.xmax + if (!in_pos && bandwidth < 0.06 && b$close > band[["upper"]]) { + in_pos <- TRUE; entry <- b$close; stop <- b$close - 2 * atr_value; trades <- trades + 1L + } else if (in_pos) { + stop <- max(stop, b$close - 2 * atr_value) + if (b$close < stop) { returns <- c(returns, (b$close - entry) / entry); in_pos <- FALSE } + } +} +print_equity("Bollinger squeeze", summarize_equity(returns, trades)) diff --git a/examples/r/strategy_macd_adx.R b/examples/r/strategy_macd_adx.R new file mode 100644 index 00000000..5ab56949 --- /dev/null +++ b/examples/r/strategy_macd_adx.R @@ -0,0 +1,24 @@ +# Trend follower: enter long on a MACD histogram cross up, but only when ADX(14) > 20 +# confirms a trend; exit when the histogram crosses back below zero. +library(wickra) +source("_common.R") + +args <- commandArgs(trailingOnly = TRUE) +bars <- if (length(args) >= 1) load_ohlcv_csv(args[1]) else synthetic_candles(2000) + +macd <- MacdIndicator(12, 26, 9); adx <- Adx(14) +returns <- numeric(0); trades <- 0L; in_pos <- FALSE; entry <- 0; prev_hist <- NA_real_ +for (i in seq_len(nrow(bars))) { + b <- bars[i, ] + m <- update(macd, b$close) + a <- update(adx, b$open, b$high, b$low, b$close, b$volume, b$timestamp) + if (is.na(m[["macd"]]) || is.na(a[["adx"]])) next + trending <- a[["adx"]] > 20 + if (!in_pos && trending && is.finite(prev_hist) && prev_hist <= 0 && m[["histogram"]] > 0) { + in_pos <- TRUE; entry <- b$close; trades <- trades + 1L + } else if (in_pos && m[["histogram"]] < 0) { + returns <- c(returns, (b$close - entry) / entry); in_pos <- FALSE + } + prev_hist <- m[["histogram"]] +} +print_equity("MACD + ADX trend", summarize_equity(returns, trades)) diff --git a/examples/r/strategy_rsi_mean_reversion.R b/examples/r/strategy_rsi_mean_reversion.R new file mode 100644 index 00000000..d0a944db --- /dev/null +++ b/examples/r/strategy_rsi_mean_reversion.R @@ -0,0 +1,20 @@ +# Mean reversion: go long when RSI(14) drops below 30, exit when it recovers above 50. +library(wickra) +source("_common.R") + +args <- commandArgs(trailingOnly = TRUE) +bars <- if (length(args) >= 1) load_ohlcv_csv(args[1]) else synthetic_candles(2000) + +rsi <- Rsi(14) +returns <- numeric(0); trades <- 0L; in_pos <- FALSE; entry <- 0 +for (i in seq_len(nrow(bars))) { + cl <- bars$close[i] + value <- update(rsi, cl) + if (!is.finite(value)) next + if (!in_pos && value < 30) { + in_pos <- TRUE; entry <- cl; trades <- trades + 1L + } else if (in_pos && value > 50) { + returns <- c(returns, (cl - entry) / entry); in_pos <- FALSE + } +} +print_equity("RSI mean-reversion", summarize_equity(returns, trades)) diff --git a/examples/r/streaming.R b/examples/r/streaming.R new file mode 100644 index 00000000..0bfc63ec --- /dev/null +++ b/examples/r/streaming.R @@ -0,0 +1,22 @@ +# Feed a synthetic price series through several indicators tick by tick (O(1) each). +library(wickra) +source("_common.R") + +prices <- synthetic_prices(500) +sma <- Sma(20); ema <- Ema(20); rsi <- Rsi(14); macd <- MacdIndicator(12, 26, 9) + +last_sma <- last_ema <- last_rsi <- NA_real_ +last_macd <- NULL +for (price in prices) { + last_sma <- update(sma, price) + last_ema <- update(ema, price) + last_rsi <- update(rsi, price) + last_macd <- update(macd, price) +} + +cat(sprintf("Streamed %d prices through SMA(20), EMA(20), RSI(14), MACD(12,26,9):\n", length(prices))) +cat(sprintf(" SMA = %.4f\n", last_sma)) +cat(sprintf(" EMA = %.4f\n", last_ema)) +cat(sprintf(" RSI = %.4f\n", last_rsi)) +cat(sprintf(" MACD = %.4f signal=%.4f hist=%.4f\n", + last_macd[["macd"]], last_macd[["signal"]], last_macd[["histogram"]]))