Strategy vault / Multi-timeframe
multiple timeframe trading
Demonstrates how the pine language use multiple timeframe
Demonstrates how the pine language use multiple timeframe
Source Pine Script
/*backtest
start: 2021-05-04 00:00:00
end: 2022-05-03 23:59:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Bitfinex","currency":"BTC_USD"}]
*/
strategy("multiple timeframe trading")
expr = ta.ema(close, 5)
hVal = request.security(syminfo.tickerid, '60', expr)
plot(expr, timeframe.period)
plot(hVal, '1hour')
// 5 hour vs 5 days
if hVal > expr
strategy.entry("long", strategy.long)
else
strategy.entry("short", strategy.short)
Published by 发明者量化 on the FMZ strategy square · last modified 2022-05-06. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/multiple-timeframe-trading.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- EMA RSI and MACD Based Multi Timeframe Trading StrategyPine Script · Multi-timeframe · 1h
- Low Pyramid Risk Tracking StrategyPine Script · Multi-timeframe · 1d
- MacD Custom Indicator Multiple Time FrameAll Available OptionsPine Script · Multi-timeframe · 1h
- Multi Timeframe Adaptive Dynamic KDJ Indicator StrategyPine Script · Multi-timeframe · 1d
- Multi Timeframe Dynamic Stop Loss EMA Squeeze Trading StrategyPine Script · Multi-timeframe · 1h
- Multi Timeframe Smart Money Concept Support and Resistance Dynamic Trading StrategyPine Script · Multi-timeframe · 2d