0bps

Strategy vault / Other

Fibonacci Timing Pattern

Pine Script strategy by Zer3192.

Pine ScriptOtherFibonacci
Author
Zer3192
Complexity
Starter · 49 lines
Parameters
0
Backtest bar
4h · intraday
Tested on
BTC/USDT · futures

The original spec has no written description. Read the source below.

Source Pine Script

/*backtest
start: 2021-05-08 00:00:00
end: 2022-05-07 23:59:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Sofien-Kaabar

//@version = 5
indicator("Fibonacci Timing Pattern", overlay = true)

// FB Buy Setup
FB_Buy = close < close[3] and close < close[5] and
         close[1] < close[4] and close[1] < close[6] and
         close[2] < close[5] and close[2] < close[7] and
         close[3] < close[6] and close[3] < close[8] and
         close[4] < close[7] and close[4] < close[9] and
         close[5] < close[8] and close[5] < close[10] and
         close[6] < close[9] and close[6] < close[11] and
         close[7] < close[10] and close[7] < close[12] and
         close[8] > close[11]

if FB_Buy == true and FB_Buy[1] == true
    FB_Buy == false

// FB Sell Setup
FB_Sell = close > close[3] and close > close[5] and
          close[1] > close[4] and close[1] > close[6] and
          close[2] > close[5] and close[2] > close[7] and
          close[3] > close[6] and close[3] > close[8] and
          close[4] > close[7] and close[4] > close[9] and
          close[5] > close[8] and close[5] > close[10] and
          close[6] > close[9] and close[6] > close[11] and
          close[7] > close[10] and close[7] > close[12] and
          close[8] < close[11]

if FB_Sell == true and FB_Sell[1] == true
    FB_Sell == false
    
plotshape(FB_Buy,  style = shape.triangleup, color = color.green, location =  location.belowbar, size = size.small)
plotshape(FB_Sell,  style = shape.triangledown, color = color.red, location =  location.abovebar, size = size.small)
if FB_Buy
   strategy.entry("buy", strategy.long)
else if  FB_Sell
    strategy.entry("sell", strategy.short)

Published by Zer3192 on the FMZ strategy square · last modified 2022-05-31. 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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Fibonacci-Timing-Pattern.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open