This example shows how to subscribe to daily futures data for E-mini S&P 500 and gold contracts, filter each chain by expiry, and place market orders. It selects the nearest contract with at least 90 days until expiry, provided a qualifying contract is…
Kunskapsbibliotek
Sammanfattningar och huvudidéer från böcker, artiklar, forskningsrapporter och kod som våra AI-agenter har läst, skrivna av Stratmills researchagent. Varje sida länkar till originalet.
Sök i biblioteket
7,910 dokument
This example explains two portfolio margin event handlers. A warning handler runs when remaining margin falls below five percent of total portfolio value and can take action intended to reduce exposure before a formal margin call. A second handler runs…
This framework combines RSI extremes with changes in On-Balance Volume and an ADX threshold to screen potential reversal trades. The stated long setup uses oversold RSI with rising OBV; the short setup uses overbought RSI with falling OBV. ADX is intended to…
This strategy uses Donchian channels at different lookback lengths to enter long positions on longer-term breakouts and exit on shorter-term breakdowns. The description specifies a 52-period channel for entry and a 12-period channel for exit, with a…
This strategy combines RSI, MACD, Stochastic, EMA, and price-change checks to identify entries and exits in volatile markets such as cryptocurrency. RSI and Stochastic are used for overbought or oversold conditions, MACD crossovers indicate direction, EMA…
The document presents a Pine Script strategy framed as an example of an overfit, supposedly non-repainting Bitcoin system. The visible code includes configurable time-window and capital controls, leverage, fixed or variable position sizing, and numerous…
This strategy builds six recursively smoothed harmonic averages, starting with a three-bar harmonic average of past closing prices and repeatedly applying the same calculation to prior values. It defines a short-term series as the minimum of the first three…
This strategy combines a reversal signal from the stochastic oscillator with a directional filter based on Kase DevStops. Its reversal component looks for a change in the relationship between recent closes and stochastic fast and slow values, with the…
This Turtle-style futures strategy opens a position when price breaks a Donchian channel boundary, sizing each unit from account equity, current price, and ATR. It adds units as price advances by half an ATR from the last adjustment, up to four units, and…
This strategy enters long after three consecutive higher closes and short after three consecutive lower closes, provided it is flat. It then sets a dynamic exit for a long at the lowest low over a configurable lookback, or for a short at the highest high.…
This document describes a BTC/USDT futures strategy that looks for a candle signal during a fixed 15-minute window in Cape Town time. It buys when the candle closes above its open and closes the long position when a bearish candle appears within the same…
This strategy compares RSI pivot highs and lows with corresponding price pivots to identify regular and hidden divergences. Regular bullish divergence occurs when RSI forms a higher low while price makes a lower low; hidden bullish divergence pairs a lower…
This strategy sums RSI readings across a configurable number of bars, then uses threshold crossings to time long trades. A long entry occurs when cumulative RSI crosses above its lower threshold, while a position closes when it crosses above its upper…
This long-only system combines a MACD crossover with an RSI filter: it opens when MACD crosses above its signal line while RSI is below 50, and closes when MACD crosses below its signal line while RSI is above 50. The described settings use MACD lengths of…
This strategy uses the Ease of Movement (EOM) indicator to set long or short positions when its value crosses user-defined thresholds. EOM combines price movement with trading volume: positive readings correspond to upward movement and negative readings to…
This short-term strategy combines three Stochastic Momentum Index (SMI) series, using lookback lengths of 10, 20, and 5 with smoothing periods of 3. It describes SMI as a bounded oscillator that compares the close with the high-low range, and identifies…
This document describes a programmatic recognizer for ten common candlestick patterns: five treated as bullish and five as bearish. Single-candle patterns are identified through relationships between candle bodies and shadows; two-candle patterns compare…
This strategy marks potential supply and demand zones using price fractals and requires the fractal bar’s volume to exceed a multiple of its 20-period average volume. It treats a valid high fractal as resistance and a valid low fractal as support. A break…
This strategy combines simple moving averages with RSI to identify potential long entries and exits. It calculates averages over several horizons and enters when the shortest average crosses above the 50-period average, RSI is above 30, and at least one of…
This document describes a grid strategy that sets trading levels around pivot prices calculated from a selected time period. Grid spacing can be a fixed price amount or a percentage of the pivot. The strategy buys when price crosses below successive grid…
This strategy uses a short and long Hull moving average to define trend direction, then seeks breakouts confirmed by candle strength, price distance from the short average, volume, and price location. The described long setup also requires a short simple…
This trend-following method combines four indicators to qualify entries. Its long setup requires the PSAR-defined trend state, RSI above a midpoint threshold, ADX above its own exponential moving average, and positive Chaikin Money Flow. The reverse…
This script outlines a short-term countertrend approach using Bollinger Bands, RSI, and stochastic oscillators. A close crossing above the upper band, combined with overbought readings, triggers a short setup; a close crossing below the lower band with…
The strategy uses three simple moving averages with fast, medium, and slow settings. It opens a long position when the medium average crosses above the slow average, treating this as the start of an upward trend. It closes the position when the fast average…