Docs

AlfaTactix docs: build a strategy, test it and get the code

Short guides for each step, from your idea to an MQL5 file for MetaTrader 5 or a Pine Script v6 strategy for TradingView.

Start here

Three things to do, in this order.

  1. Build your strategy

    Go through the 7 steps of the form. You fill it in yourself, or in the paid plans you describe the idea to Tactix Studio and it fills the form for you to check.

  2. Test it

    Save the strategy in Step 7, then press "Backtest this strategy". The backtest needs you to be signed in.

  3. Get the code

    Press "Get the code" in Step 7. Code Generator opens with your strategy chosen; download the file and run it on your platform.

Step 7, Review and save: the whole strategy read back as plain sentences, with what Tactix Studio set and what it assumed.Step 7, Review and save: the whole strategy read back as plain sentences, with what Tactix Studio set and what it assumed.
Step 7, Review and save: the whole strategy read back as plain sentences, with what Tactix Studio set and what it assumed.

The 7 steps

Every step is checked when you go on, and Step 7 lists anything left to fix.

  1. Step 1

    Information and platform

    Name the strategy and choose the platform: MetaTrader 5 (MQL5) or TradingView (Pine Script v6). From then on the form offers only what that platform can run.

  2. Step 2

    Timeframes

    Choose one timeframe to trade on and up to two higher ones for context.

  3. Step 3

    Entry rules

    Pick from 47 indicator types and set when to buy and when to sell. Tip: start with one or two indicators.

  4. Step 4

    Filters

    Decide when the strategy may trade: sessions, time ranges and days, spread, correlation or your own conditions. Up to 8 filters.

  5. Step 5

    Exits

    Stop loss, take profit, trailing stop, breakeven, partial closes, exit rules and time exits, set for buy and sell.

  6. Step 6

    Risk and money management

    Set the position size and the account limits: open positions, entries per day, daily loss, drawdown and losing streaks.

  7. Step 7

    Review and save

    Read the whole strategy back as sentences, fix anything on the check list, then save. Reopen it later from "Open a saved strategy".

Step 1, Information and platform: the strategy name, a description and the platform, MetaTrader 5 (MQL5).Step 1, Information and platform: the strategy name, a description and the platform, MetaTrader 5 (MQL5).
Step 1, Information and platform: the strategy name, a description and the platform, MetaTrader 5 (MQL5).
Step 3, Entry rules: a buy rule where RSI(14) crosses above its oversold level, with the summary in plain words.Step 3, Entry rules: a buy rule where RSI(14) crosses above its oversold level, with the summary in plain words.
Step 3, Entry rules: a buy rule where RSI(14) crosses above its oversold level, with the summary in plain words.

Run the code on your platform

Always confirm a strategy in your platform’s own Strategy Tester before you trade it.

  • MetaTrader 5

    1. Download the .mq5 file from Code Generator.
    2. Open it in MetaEditor and compile it.
    3. Test it in the MetaTrader 5 Strategy Tester.
  • TradingView

    1. Copy the Pine Script v6 code from Code Generator.
    2. Paste it into the Pine Editor and add it to the chart.
    3. Check it in the TradingView Strategy Tester.
Code Generator: the file of a saved strategy for MetaTrader 5, with Download, Copy code and the install steps.Code Generator: the file of a saved strategy for MetaTrader 5, with Download, Copy code and the install steps.
Code Generator: the file of a saved strategy for MetaTrader 5, with Download, Copy code and the install steps.

Common problems

Save is greyed out in Step 7.

Step 7’s check list names each problem. Fix them and Save becomes available.

Where is my code?

Save the strategy, then press "Get the code" in Step 7. Code Generator opens with your strategy chosen.

I can’t use Tactix Studio.

Tactix Studio is in the paid plans. Without one, the demo shows a recorded example, and you can always fill in the form yourself.

My code downloads for this month are used.

Files you already got this month stay available. Pricing shows the limits of each plan.

Can I move a strategy from MetaTrader 5 to TradingView?

Yes. In Step 1, press "Change" next to the platform. Before it switches, the form lists the settings the other platform does not offer and how they change. A strategy runs on one platform at a time.

My backtest differs from MetaTrader 5 or TradingView.

Small differences have known causes, such as the data and the costs. The backtest engine page explains them. Always confirm in your platform’s Strategy Tester.

Still stuck?

Write to us. We reply within one business day.