Home

Android app · in development, v0.2

La Piña Investments

An Android app that applies one trend and breakout method to stocks and tells you, rule by rule, whether each one is a buy today, one to watch, or a no.

  • Kotlin
  • Jetpack Compose
  • Room
  • WorkManager
  • Lightweight Charts
  • 330+ unit tests

Status: in development, v0.2, Android.

Web demo. These are the Android app's screens, recreated for the browser. The verdicts come from the app's engine, which I ported line by line from Kotlin to JavaScript. The companies, prices and indices are invented, generated from fixed seeds.

Spanish interface, as in the app. Tap anything. Datos simulados
Charts by TradingView

The method

methodology v2

A verdict is a list of rules

The method combines a trend template, the classic base patterns (cup with handle, Darvas box, flags) and a breakout volume rule the app calls PAVA. Structural filters reject a stock outright. Temporary blocks only hold it on watch. A score from 0 to 100 decides the rest, using closed daily bars only.

The rules of the method, in evaluation order
RuleWhat it checksIf it fails
H1 DataAt least 260 closed sessions, no gaps, volume presentRECHAZADO
H2 LiquidityPrice of at least $5 or 2 EUR; 50-day traded value of at least $10M or 2M EURRECHAZADO
H3 Trend templateTT1-TT7: price over the 50, 150 and 200-day averages, averages stacked, the 200-day rising for a month, 30 % or more above the 52-week low, within 25 % of the highRECHAZADO
H4 Relative strengthRS rating of 80 or more: percentile of the 12-month return weighted 40/20/20/20RECHAZADO
H5 PatternDarvas box, cup with handle, high tight flag or bull flag, pivot within 10 % of the 52-week highRECHAZADO
H6 PivotClose in the buy range (pivot to +5 %) and not stretched from the 50-day average; inside the base is a noRECHAZADO (within 5 % below: watch)
B1 PAVAClose above the pivot on at least 1.4 times the 50-day volume, in the upper half of the day's range, confirmed within 5 sessionsVIGILANCIA
B2 RS leaderRS of 90 or moreVIGILANCIA
B3 Market regimeCorrection or rally attempt: no new buys. Under pressure: only RS 95 or moreVIGILANCIA
B4 EarningsNo new buys in the 10 sessions before a reportVIGILANCIA
B5 Simple flagA bull flag needs a strong breakout (2 times the volume)VIGILANCIA
S ScoreRS and RS line 25, pattern 20, volume 20, overhead supply 15, trend 10, fundamentals 10 (rescaled when absent)70+: APROBADO · 50-69: watch · under 50: no
V1-V8 SellingInitial stop at the base low or 8 % at most, breakeven at +15 %, 10-week average and SMA20 exits, half off at +20 % (later for fast leaders), climax and bearish-pattern warningsSell at the next open

How it's built

Kotlin · four modules

A pure engine, a data layer, and an Android shell

engine

pure Kotlin/JVM · 263 tests

Indicators, the trend template, RS, the bases, PAVA, overhead supply, the regime state machine, score, verdict, stops, sizing, the paper portfolio's sell rules, the backtest, the heat map layout. It has no Android imports, so it runs and is tested on the JVM.

marketdata

pure Kotlin/JVM · 67 tests

Data sources behind one interface, the symbol catalog, the nightly scan service, the cache refresh, SEC EDGAR's filings and the macro panel's sources.

learn

pure Kotlin/JVM

The course: 85 lessons in Markdown, links from lessons into the app, progress, tests and card review.

app

Android · Compose

Jetpack Compose with Material 3 and fixed brand colours, Room (schema v7) for the cache, lists, alerts and the paper portfolio, WorkManager for the nightly scan, manual dependency injection instead of Hilt, and Lightweight Charts in a WebView.

Data, all free

Daily bars from Yahoo's chart endpoint by default; US companies' filings and earnings dates from SEC EDGAR; macro figures from the ECB, the BLS, the US Treasury and the New York Fed. None of it needs a key or a subscription.

What this web demo ports

engine.js reproduces the Analyzer (H1-H6, B1-B5, score, plan), the four bases, PAVA with its weekly variant, overhead supply, the RS line, the regime state machine, the "what is missing" texts, the automatic lists, sizing and the squarified treemap. The tests in site/tests/la-pina.test.mjs run the Kotlin fixtures and get the same verdicts. The price series come from a bit-for-bit port of java.util.Random, the generator the app's screenshot tool uses.

Left out: gold, silver and bitcoin's adapted rules, the chart-pattern detector (flat bases from ranges and the B7 bearish-pattern block), the fundamentals layer, trading costs and the full backtest. Those stay in the app.

Notes

  • La Piña is a learning tool. It places no orders and connects to no broker. The user decides and carries the risk.
  • Until a setup has an out-of-sample test, the backtest labels it "Muestra insuficiente" against its index and shows the SPIVA base rate beside it.
  • The method's defaults come from its written specification, and the code marks them as adjustable settings.
  • The companies, prices and trades on this page are all simulated.