Last updated on 9. 1. 2019 by Kornel Mazur

Settings – Trading options

These settings allow you to specify the properties of the generated strategies as well as testing conditions.

Trading options govern behavior of the strategy in backtesting engine – for example whether all orders should be closed at the end of day, etc.

StrategyQuant Trading options config

Exit At End Of Day, Exit On Friday

if selected, the strategy will close all position at the end of the day or end of the week (Friday) at the specified time. This way you’ll have no position open overnight or during the weekend.


Limit Time Range, Time Range From, Time Range To, Exit At End Of Range

this limits the hours the strategy is checking for entry signal to a given time range.

If used in combination with Exit At End Of Range then all open positions are closed at the end of the range.

If you don’t check the Exit At End Of Range then the strategy will not open new trades outside the trading range, but the already opened positions will be not closed.


Maximum Trades Per Day

you can limit maximum trades the strategy takes per day


Minimum / Maximum SL & PT

allows you to specify minimum and maximum Stop Loss and Profit Target. 0 means unlimited.

When you limit your SL or PT, then whatever value is computed using the strategy, it will be cut to not exceed the given range.



Configures trading session for futures / equities intraday trading. Sessions themselves can be created and managed in Data manager.


Reserved bars

Bars to reserve before starting trading. This number should be higher than period of any indicator used.


Realistic gaps handling

Only for MT4 – backtester in MetaTrader4 handles gaps in a way that is different from real trading. When there is a gap, it fills Stop/Limit order at its desired open price, instead of at price after the gap.

In real live trading the order is fillled at price after the gap.

Note that by turning this on your backtest in SQ might differ from backtest in MT4, but it will be more realistic.

StrategyQuant realistic gaps handling


Store Chart Data

if checked SQ X will save also complete chart data for the backtest, so you will be able to see history chart with backtest with used all indicators and all orders drawn on chart. This can help you review the strategy and see visually how it is trading.

When this option is turned on, you will be able to see the chart in Results -> Trades on chart tab:

Strategyquant trades on chart

Was this article helpful? The article was useful The article was not useful

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
18. 12. 2021 1:13 pm

Please include an explanation on “Max distance from market” and “Max distance percent”.
Does this mean the strategy won’t trade when there is a large spread, based on a specified percentage ?

Reply to  Kevin
20. 12. 2021 6:14 pm

if you enable the Max distance from market option then for example:
if a strategy wants to place a buy limit order above the current market price that will not be possible if the limit price is 6% higher for most exchanges. 6% seems a lot but sometimes indicators can give you that price and SQ needs to be in match with the exchange order rules

Reply to  tomas262
6. 6. 2022 3:21 am

Is there a way to find out how much distance a broker allows? My EA keeps saying something like “Based on its logic, the strategy tried to place stop/limit order at the incorrect price. Market price: 0.96190000, min. price allowed: 0.96190000, stop/limit order price: 0.95438000”

Reply to  Sylphritz
6. 6. 2022 7:19 pm
Miguel Rubial
Miguel Rubial
10. 1. 2023 6:33 am

Hi, How can I limit new orders being placed on a specific Day of the week? For example, I don’t want new trades to be opened or new orders to be placed on Fridays after 3 pm

Reply to  Miguel Rubial
13. 1. 2023 8:58 pm

this can be done only using templates … check

Vitor L Barros
16. 5. 2023 8:54 pm

How can I set up a maximum number of open trades so that every strategy is built following that rule?

Reply to  Vitor L Barros
22. 5. 2023 8:23 pm

this needs to be done using a template made in AlgoWizard. You can use the template in the SQ Builder. See

hamed rahmatpour
hamed rahmatpour
6. 10. 2023 5:52 pm

I want to my EA enter if the spread is smaller than a specific number…(i don’t want to trade at wide spreads)
how can I manage that problem?

Reply to  hamed rahmatpour
8. 10. 2023 10:08 pm

You need to edit the strategy using AlgoWizard. Check my post here
Let us know if any issues