Pine Script Optimization for Trend Following

Job ID: 39342322

Budget: $30 – $250 USD

I need a skilled Pine Script programmer to optimize my trend-following trading strategy script.

Project Overview
I’m looking for a Pine Script developer to implement a multi-timeframe trading strategy in TradingView. This strategy centers around concepts popularized by ICT (Inner Circle Trader) and includes weekly bias determination, daily confirmation, and 1-hour execution logic.

Strategy Outline
Weekly Bias Determination

Compare the two previous weekly candles and the new, currently forming weekly candle.

Check for liquidity sweeps (sweep of a previous candle’s high/low that fails to close beyond that level).

Bearish: If Candle 2 sweeps Candle 1’s high but closes back below it, anticipate a downtrend for the upcoming week.

Bullish: If Candle 2 sweeps Candle 1’s low but closes back above it, anticipate an uptrend.

Order Blocks & Fair Value Gaps

Strategy must identify valid Order Blocks (OBs) based on recognized breaks in market structure or displacement.

Must detect Fair Value Gaps (FVGs) under factual liquidity/structure conditions.

Only mark OBs/FVGs that meet those conditions (i.e., structure break confirmation, not random candles).

Market Shifts (CHoCH)

Identify clear breaks in market structure or changes in character (CHoCH).

Use these breaks as part of the script’s logic to confirm or negate trend signals.

Turtle Soup Setups

Implement logic for Turtle Soup: a well-known high/low is swept, price strongly reverses back within the range.

Daily Confirmation

After the weekly bias is set, check the daily chart similarly (sweeps of previous daily highs/lows).

If the daily analysis confirms the weekly bias, it strengthens the signal.

1-Hour (1H) Scenarios

Once weekly and daily confirm each other, drop to 1H to outline potential paths.

Identify liquidity pools, potential FVG retests, OB mitigations, and define objectives consistent with the higher-timeframe bias.

AMD (Accumulation–Manipulation–Distribution) Framework

Monday (Accumulation): Mark Monday’s High (MH) and Monday’s Low (ML).

Tuesday (Manipulation): Look for a “Judas swing” (false breakout) opposite the weekly bias, then enter on confirmation (FVG or OB retest).

Wednesday (Distribution): Continue in the established direction.

Risk Management & Execution

Stops placed beyond manipulation swings.

Targets set at logical liquidity pools or higher-timeframe FVGs.

Integrate any additional exit logic as needed.

Technical Requirements
Proficiency in Pine Script (version 4 or 5, though v5 is preferred).

Experience with Trend-Following Strategies: Must understand how to incorporate concepts like moving averages, swings, and expansions.

Familiarity with Key Indicators:

Moving Averages (MA)

RSI

MACD
These may be used for optional confluence or to optimize signals.

Optimization & Efficiency

Script should be written cleanly and efficiently so it doesn’t hit TradingView’s limits.

Must handle multiple request.security() calls for weekly, daily, and 1-hour data carefully.

Clear Code Documentation

Include in-line comments explaining how you detect sweeps, how order blocks or FVG logic works, etc.

Examples of Past Work

Links to previous Pine Script publications or references are appreciated.

If possible, demonstrate your ability to handle multi-timeframe logic and advanced ICT concepts in prior scripts.

Deliverables
Pine Script Source Code

Fully annotated, covering the weekly bias, daily confirmation, and 1H execution logic.

Explanation/Documentation

High-level readme or instructions on how to use the strategy.

Outline any user-adjustable parameters (e.g., toggles for FVG plotting, OB detection, time-of-day filters).

Basic Strategy Tester Integration

If you can, include entry/exit points for backtesting in TradingView’s strategy tester.

Support/Adjustments

Willing to perform minor revisions post-delivery if logic needs fine-tuning.

Thank you!
If you meet these requirements and can deliver a robust multi-timeframe Pine Script incorporating my outlined ICT approach, please reach out with examples of previous work and relevant experience.
Related categories: PHP JavaScript Python Algorithm Statistics