Documentação

Last updated on 20. 11. 2026 by clonex / Ivan Hudec

Indicadores personalizados

StrategyQuant comes with a long list of indicators, and sooner or later you want one that isn’t in it. Q builds it for you: you describe the formula, Q writes the indicator, compiles it and makes it available as a building block, without a restart.

An indicator your strategy uses also has to exist on the platform where the strategy trades. Q can also translate it for that platform: MetaTrader 4 (Step 3), MetaTrader 5, NinjaTrader 8 or EasyLanguage (MultiCharts, TradeStation).

Step 1: Describe the indicator

Start a new chat and pick Custom Analysis Tabs & Code, or write your own sentence. Clicking one of the tile’s examples sends it at once. Give the name, the formula and the default parameters:

Create a custom indicator called PriceZScore: how many standard deviations the current price is from its simple moving average — (Close − SMA(Period)) / StdDev(Period), Period default 20. Make it an oscillator centered at 0, compile it and confirm it appears as a building block.

The PriceZScore request and Q's answer: compiled, a building block, tested on 3,000 bars

18 steps in 1 minute 3 seconds. Q’s answer says the indicator passed StrategyQuant’s indicator test on 3,000 bars, including a look-ahead check.

Step 2: Use it as a building block

The new indicator is in the Builder straight away: Full settings > Building blocks, in the Indicadores list as “(PZS) Price Z Score”. It starts unticked: tick it in the Use column so the Builder can pick it, and it combines with comparisons like any built-in indicator.

If you want one ready-made condition instead, ask Q for a signal on top of it:

Now create a signal on top of it: PriceZScore crosses below -2. Compile it and confirm it appears as a building block.

The Builder's Signals list filtered by P, with "(PZS) Price Z Score crosses below -2"

The signal took 10 steps and 25 seconds. It sits in the Sinais list under its own group, Price Z Score, and it starts unticked too.

Step 3: Translate it for your platform

Ask for the platform the strategy will trade on. This tile example builds an indicator and translates it in one request:

Create a simple custom indicator called TripleEMA: three exponential moving averages of the close with periods Fast, Medium and Slow (defaults 8, 21, 55), one output line each. Compile it and confirm it appears as a building block. Then translate it to MQL4 and prove that the MT4 values match the SQX values.

Q's answer for TripleEMA: compiled and tested in StrategyQuant, MQL4 written, no MT4 terminal to compare with

38 steps in 2 minutes 19 seconds. One step failed along the way (the red mark); the answer still reports that the indicator compiled and passed the test. Q wrote the MetaTrader 4 version and said where it saved it. It also said what it could not do: on our computer no MetaTrader 4 terminal was set up, so the translation was not compiled in MetaTrader or compared with it there.

Solução de problemas

Q says the MetaTrader values are not proven to match. No MetaTrader terminal is set up for Q on your computer. Q’s answer gives the path of the translated file; compile it in MetaEditor and compare it yourself.

Where to go from here

What it costs. One indicator takes on average about 60 credits with GPT-6.1 Terra (real usage, October–November 2026). Sonnet 5 and Opus 5.5 cost several times as much. On this page, with GPT-6.1 Terra: PriceZScore and its signal about 70 together, TripleEMA with the MetaTrader 4 translation 73.

Este artigo foi útil? O artigo foi útil O artigo não foi útil

0 Comentários
mais antigos
mais recentes Mais votado