Merged
Conversation
…truction and caching
…ntime qty calculation based on default_qty_type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Golang Port PoC
Current Performance (Measured)
Target Performance
License Safety
Phase 1: Go Parser + Transpiler
Phase 2: Go Runtime
Phase 2.5: request.security() Module
Baseline
ForwardSeriesBuffer Alignment
Inline TA States
Complex Expressions
Integration
Phase 3: Binary Template
Validation
./bin/strategyon daily-lines-simple.pine validates basic features./bin/strategyon daily-lines.pine validates advanced featuresPhase 4: Additional Pine Features for Complex Strategies
-1,+x,not x,!condition)naconstant for NaN value representationtimeframe.ismonthly,timeframe.isdaily,timeframe.isweeklybuilt-in variablestimeframe.periodbuilt-in variableinput.float()with title and defval parameters (positional + named)input.int(),input.bool(),input.string()for typed configurationinput.source()for selecting price source (close, open, high, low)math.pow()with expression arguments (not just literals)src[variable]where variable is computedinput.float(defval=1.4, title="X")fully supportedPhase 4.5: BB7 Strategy Prerequisites
input.session()for time range inputs (entry_time, trading_session)time()function for session filteringsyminfo.tickeridbuilt-in variable (for security() calls) - Added to templatefixnan()function for forward-filling NaN values (pivothigh/pivotlow results)pivothigh()function for resistance detectionpivotlow()function for support detectionmath.min()andmath.max()inline in conditions/ternariessecurity()with complex TA function chains (sma, pivothigh/pivotlow, fixnan combinations)barmerge.lookahead_onconstant for security() lookahead parametersecurity()with lookahead parameter supportwma()weighted moving average function (WMAHandler implemented and registered)dev()function for deviation detection (DEVHandler implemented and registered)strategy.position_avg_pricebuilt-in variable (StateManager + codegen sampling order fixed)valuewhen()function for conditional value retrieval (66+ tests: handler validation, runtime correctness, integration scenarios)valuewhen()runtime evaluation in security() contexts (StreamingBarEvaluator support, 7 test functions, 25 subtests, occurrence/boundary/expression/condition/validation/progression/state coverage)PineScript Support Blockers (10)
BB7 Dissected Components Testing
bb7-dissect-session.pine- manual validation PASSEDbb7-dissect-sma.pine- manual validation PASSEDbb7-dissect-bb.pine- manual validation PASSEDbb7-dissect-vol.pine- manual validation PASSEDbb7-dissect-potential.pine- manual validation PASSEDbb7-dissect-sl.pine- manual validation PASSEDbb7-dissect-tp.pine- manual validation PASSEDbb7-dissect-adx.pine- manual validation PASSEDPhase 5: Strategy Validation
./bin/strategyon rolling-cagr.pine - manual validation PASSED./bin/strategyon rolling-cagr-5-10yr.pine - manual validation PASSED./bin/strategyon BB7 - manual validation PASSED./bin/strategyon BB8 - manual validation PASSED./bin/strategyon BB9 - manual validation PASSEDtime ./bin/strategyexecution <50ms (49µs achieved with real SMA calculation)ldd ./bin/strategyshows no external deps (static binary)node src/index.jswith./bin/strategyin testsCurrent Status