MQL5 Refactor Job – NIKA_FTS (REV + PSAR + HA only, closed-candle, max speed)

MQL5 Индикаторы

Техническое задание

Summary

Refactor my current NIKA_FTS.mq5 into a minimal, fast, backtest-deterministic indicator that keeps:

  • Tilson T3 pair (fast/slow) with separate alphas → drives REV state

  • PSAR (plot + up/down cross signals)

  • Heikin-Ashi overlay (candles/bars/hollow), colored by REV state

Remove everything else (RSI, TSI, TRM, MA1/2/3, MA crosses, Curl, bar-color logic from RSI/TRM, etc.).
All logic must be closed-candle only (no live/intrabar behavior).


Scope of Work

KEEP & Implement

  1. Tilson T3 (double-alpha)

    • Inputs:

      input int aLength = 5; // fast T3 length input int Length = 8; // slow T3 length input double alphaFast = 0.70; // fast T3 alpha input double alphaSlow = 0.70; // slow T3 alpha

    • Buffers: anT3Average[] (fast), nT3Average[] (slow)

    • Plots: T3 Fast color line, T3 Slow color line, T3 Fill between them

    • Calls:

              calc_t3_series(src_arr, total, aLength, alphaFast, anT3Average);
      calc_t3_series(src_arr, total, Length , alphaSlow, nT3Average);
      
  2. REV state (Tilson-based)

    • For bar i (closed bars only):

      • uc : anT3Average[i] >= nT3Average[i] && Close[i] > nT3Average[i]

      • dc : anT3Average[i] <= nT3Average[i] && Close[i] < nT3Average[i]

      • ur : anT3Average[i] <= nT3Average[i] && Close[i] > nT3Average[i] (cross up)

      • dr : anT3Average[i] >= nT3Average[i] && Close[i] < nT3Average[i] (cross down)

    • Output buffer: Rev[] = +1 (bull: uc/ur), -1 (bear: dc/dr), 0 otherwise.

  3. PSAR

    • Inputs: start , inc_v , max_v

    • Use iSAR() handle; copy to sar[]

    • Signal buffer: SARsig[] = +1 if Close[i] >= sar[i] , else -1

    • Plot: dots/arrows (bull/bear color by state)

  4. Heikin-Ashi overlay (KEEP)

    • Inputs:

      enum CandleType {CT_Candles }; input CandleType type =

              CT_Candles 
      input bool haover = true; input bool rPrice = false; // optional real-close line

    • Buffers: hac_* and/or hab_* + color index buffer

    • Color rule: map REV → HA color

      • Rev>0 → bull; Rev<0 → bear; Rev==0 → neutral

  5. Alerts (closed-bar only)

    • Mode input:

      enum AlertMode { AM_PER_BAR=0, AM_PER_BAR_CLOSE }; input AlertMode i_alert_mode = AM_PER_BAR_CLOSE; input bool REVUP=false, REVDWN=false, SARUP=false, SARDWN=false;

    • Trigger only on last fully closed bar:

      • REVUP : Close[i-1] <= nT3[i-1] && Close[i] > nT3[i]

      • REVDWN : Close[i-1] >= nT3[i-1] && Close[i] < nT3[i]

      • SARUP : cross above PSAR

      • SARDWN : cross below PSAR

  6. 2-row table (Rev, SAR)

    • Inputs:

              input bool showTable=false;
      input int  textSize=12, textWidth=100, textHeight=25, tableYpos=10, tableXpos=10;
      
    • Rows: “Rev”, “SAR”; icons ✅ / ❌ / 🔸 .

    • Update only when a new bar closes (no per-tick redraw).

REMOVE / PRUNE

  • All RSI/TSI/TRM/MA/Curl code: enums, inputs, buffers, plots, alerts, palette colors, paint logic, table cells.

  • Any leftover live/intrabar logic (e.g., using TimeCurrent , per-tick alerts, on-the-fly objects).

  • Any plotting/objects unrelated to T3/PSAR/HA/table.


Closed-Candle-Only Rules (hard requirement)

  • In OnCalculate , set:

    const int last_closed = rates_total - 2; int start = (prev_calculated>0 ? prev_calculated-1 : warmup); for(int i=start; i<=last_closed; ++i) { ... } // NEVER use rates_total-1 in logic

  • Use data from arrays time[]/open[]/high[]/low[]/close[] only.

  • No SymbolInfoDouble(BID/ASK) or TimeCurrent() in logic/alerts.

  • Alerts and table update only when time[last_closed] changes (track static datetime last_bar_time ).


Performance & Code Quality (hard requirement)

  • Max speed / zero “dirty” code:

    • Single pass loop, no nested loops per bar.

    • Respect prev_calculated . Start at max(prev_calculated-1, warmup) .

    • Pre-allocate & reuse buffers; ArraySetAsSeries(..., true) once.

    • No dynamic ObjectCreate/Delete inside the bar loop. Table draw only once per closed bar; otherwise disabled.

    • Move branches out of hot loops; precompute booleans reused multiple times.

    • Keep #property indicator_plots and indicator_buffers to exact counts used.

    • Avoid repeated switch / Math* in hot path when possible; cache inputs.

    • Use built-in iSAR handle; a single CopyBuffer per call; fill EMPTY_VALUE for overflow.

    • No sleeps, prints, file I/O, or terminal calls in calc loop.

  • Backtest determinism:

    • No tick-dependent state. Results must be identical in visual/non-visual and multi-core tester.

    • No dependence on chart scaling/zoom or user objects.

  • Deinit hygiene: ObjectsDeleteByPrefix(0,"NIKA-") ; do not nuke user objects.


Final Inputs (only)

// T3
input int    aLength   = 5;
input int    Length    = 8;
input double alphaFast = 0.70;
input double alphaSlow = 0.70;

// PSAR
input double start = 0.043;
input double inc_v = 0.043;
input double max_v = 0.34;

// Visuals
enum CandleType { CT_Hollow=0, CT_Bars, CT_Candles };
input CandleType type = CT_Hollow;
input bool t3vis   = true;
input bool psarvis = true;
input bool haover  = true;
input bool rPrice  = false;

// Alerts (closed-bar only)
enum AlertMode { AM_PER_BAR=0, AM_PER_BAR_CLOSE };
input AlertMode i_alert_mode = AM_PER_BAR_CLOSE;
input bool REVUP=false, REVDWN=false, SARUP=false, SARDWN=false;

// Optional table
input bool showTable=false;
input int  textSize=12, textWidth=100, textHeight=25, tableYpos=10, tableXpos=10;

Required Buffers/Plots

  • Calc: anT3Average[] , nT3Average[] , sar[] , src_arr[] , HA arrays ( hac_* / hab_* )

  • Signals: Rev[] , SARsig[]

  • Plots:

    • Color-line T3 Fast , color-line T3 Slow , T3 Fill (2 buffers)

    • PSAR dots

    • HA candles/bars/hollow (color index)

    • Real Close line (optional)

  • Palette: only colors used by T3/PSAR/HA.


Acceptance Tests

  1. Compilation: MT5 current build, 0 errors / 0 warnings.

  2. Search-clean: No occurrences of RSI , TSI , TRM , MA1 , MA2 , MA3 , HCROSS , Curl .

  3. Closed-bar only: Changing tester from “Every tick” → “1 minute OHLC” yields identical buffers.

  4. Performance: On M1 with 50k bars, first load < 50ms and incremental updates scale O(1) per bar (no visible lag).

  5. Alerts: Fire once per qualifying closed bar (when AM_PER_BAR_CLOSE ), never on forming bar.

  6. HA coloring: Follows Rev state correctly; table (if enabled) shows only “Rev”, “SAR”.

  7. Determinism: Visual vs non-visual backtests produce the same Rev[]/SARsig[]/sar[]/T3 values.


Deliverables

  1. Refactored NIKA_FTS.mq5 .

  2. Short changelog of removed modules + final public API (inputs/plots/buffers).

  3. QA note with 3 screenshots:

    • Bull REV + SARUP

    • Bear REV + SARDWN

    • Neutral REV



  • Export a consolidated Signal[] buffer: +1 bull / 0 neutral / −1 bear (mirrors Rev ).

  • Inputs for line widths and PSAR dot size.


    input int    WarmupBars   = 500;     // bars to prefill T3 before signaling
    input int    MaxHistory   = 10000;  // cap processing for speed; 0 = unlimited
    input bool   UseSeries    = true;    // ArraySetAsSeries on calc buffers




Откликнулись

1
Разработчик 1
Оценка
(10)
Проекты
10
10%
Арбитраж
1
0% / 0%
Просрочено
2
20%
Занят
Похожие заказы
Hi, i have a project , if thats possible. I dont mind to enter manually the details of the stock split (using seeking alpha data) to keep the cost down and possibly as a second project , to automate it. I already have system that are working well with unadjusted data from stock price split. So i'd like to choose if i want to use a chart with or without stock split data. Is that possible ? Can you explain how would
Требуются ребята с опытом, которые могут на удаленной основе выполнить задачу доработки довольно несложного алгоритма для MQL4 с примерами. Присылайте образцы работ, дел на 1 день примерно, жду откликов и предложений)
FRESHBOT 30+ USD
I want an EA for Gold (XAU/USD) with trend prediction and trade execution. Timeframe: 1H and 4H Indicators: - 50 EMA & 200 EMA (trend) - RSI (above 50 = bullish, below 50 = bearish) - MACD (for momentum) Entry Rules: - Buy if: - 50 EMA > 200 EMA - RSI > 50 - MACD line > signal line - Sell if: - 50 EMA < 200 EMA - RSI < 50 - MACD line < signal line Trade Settings: - Stop Loss: 30 pips - Take
I'm looking for an expert Pine Script developer to build a complex, custom Zigzag indicator from scratch for the TradingView platform. This is not a modification of the standard Zigzag. The indicator uses a unique, state-based algorithm to identify and confirm pivots based on a specific set of rules
I am interested in purchasing a ready-made automated EA (Expert Advisor) that is already tested and profitable. My key requirements are: Consistent profits with proven results (backtests and/or live performance) Low to medium risk, not overly aggressive Works on major forex pairs, indices, or gold Ready to use with minimal setup If you have an EA that meets these criteria, please share details, performance records
Job Description: I need a professional TradingView developer to build a custom TradingView indicator that replicates the logic of a TradingView indicator I use. The indicator should identify market structure, breaks of structure (BOS), and fair value gaps (FVGs) while displaying both current and higher timeframe data on the chart. ⸻ Key Features & Logic 1. Zones & Market Structure • Zone 1 = Market Structure (base
I have a working strategy for Boom and Crash and need a programmer to build an MT5 Expert Advisor (EA) that trades on the 1-Minute timeframe . Key Requirements: Developer should have at least basic knowledge of Boom and Crash trading. EA must work only on candle ticks for Boom and Crash. The EA will receive trade alerts from my indicator and automatically open trades based on those alerts. No duplicate trades should
TradingView Pine Script v5 Indicator Detect trend using a moving average filter (SMA 50/200). Identify recent swing high/low (user-input lookback). In uptrend: calculate Fibonacci from swing low → swing high. In downtrend: calculate Fibonacci from swing high → swing low. Highlight entry zone between 0.618 and 0.786. Plot levels for Stop Loss (1.0), TP1 (0.236), and TP2 (0.0). Optionally display a small dashboard
Overview Create a MetaTrader 5 (MT5) indicator that: Pulls live sentiment data from multiple broker APIs. Calculates Net Sentiment (Long% – Short%) and plots each broker as a moving average line on the chart. Displays a weighted average line when ≥2 feeds are active. Saves all data to CSV files per broker for efficient historical loading and performance. Supported Brokers Broker Abbr. Color OandaFX
Manage my live forex account with a disciplined, low-risk approach that produces steady monthly income. My priority is capital protection, so each trade must be sized conservatively, anchored by firm stop-loss orders, and designed to keep drawdown minimal. High-risk tactics such as martingale, grid systems, or excessive leverage are off the table; a measured, rules-based strategy is essential. I will connect the

Информация о проекте

Бюджет
30 - 35 USD
VAT (25%): 7.5 - 8.75 USD
Итого: 38 - 43.75 USD
Исполнителю
27 - 31.5 USD
Сроки выполнения
до 1 дн.

Заказчик

(12)
Размещено заказов23
Количество арбитражей0