base_strategy Template parameters - sibvic/fxts2-templates GitHub Wiki
Trading section
Type of Signal / Trade
"Direct" option uses an ordinary logic. "Reverse" option will use long logic to open short trades and vice versa.
Price Type
What price to use for the indicator calculations: bid or ask.
Use HA as source
When set to true the HA bars will be used for indicators calculation instead of ordinary candles.
Entry Time frame/Exit Time frame
Timeframes used for the calculation of entry/exit indicators.
Entry Execution Type/Exit Execution Type
Whether to check entry/exit conditions when the bar closes or at every tick.
Allow strategy to trade
When set to false the strategy will show alerts only and will not trade.
Account to trade on
Account.
Allow side
Allows trades in both/long only/short only directions.
Custom ID
Custom identification for the trades. Used to work with a set of trades only. For example: if you set custom ID, the signal is detected and the Close on the opposite feature is turned on then the strategy will ignore trades with Custom ID other than specified. This way you can run several strategies on the same instrument along with each other and they to dot touch trades from other strategies (if every strategy will use its own unique custom ID).
Close on Opposite
When set to true the strategy will close opposite trades when the signal detected. For example: if the strategy detects "long/buy" signal and then it will look for short trades and close them.
Position cap, Max # of open/buy/sell positions
It allows limiting the number of trades at the same time. You can limit the number of trades by side and/or by the total number. For example, you can limit the number of trade to 5 but not more than 3 in each direction. This way you can get 3-2 or 2-3 long-short trades but not 4-1.
Position
Trade amount, Amount type
These two parameters difens size of the position. There are three types:
- In Lots. Defines the size of the opened positions. Defined in lots. The size of the lot depends on your account and symbol you trade. So, "1" can open "1 000 USD" position or "100 000 USD" positions depending on the type of your account.
- % of equity. Calculates the size of the position in order to use % of your equity.
- Risk % of equity. Calculates the size of the position in order to lose % of your equity if the stop gets hit. This option requires the stop to be specified.
Stop parameters
Stop order, Stop value, ATR Stop Multiplicator
Defines the type of stop
- No stop. No stop order will be created.
- In pips. The stop order will be created in "Stop value" pips from the opened price.
- ATR. ATR value will be calculated using "Stop value" as a period and "ATR Stop Multiplicator" as a multiplicator. The calculated value will be used as pips value for the stop.
- High/low. The highest/lowest rate will be found in "Stop value" bars back and used as a stop.
Trailing stop order
Whether to use trailing for the stop order. Used with "Trailing in pips" parameter
Trailing in pips
Trailing stop in pips. Use "1" for dynamic trailing or >= 10 for the fixed trailing step.
Close positions on daily profit, Day profit limit, $
Allows closing all positions when the profit for that day reaches the specified amount in account currency.
Limit parameters
Limit order, Limit value, ATR Limit Multiplier
Defines the type of limit
- No limit. No limit order will be created.
- In pips. The limit order will be created in "Limit value" pips from the opened price.
- ATR. ATR value will be calculated using "Limit value" as a period and "ATR Limit Multiplicator" as a multiplicator. The calculated value will be used as pips value for the Limit.
- Multiplicator of stop. Uses "Limit value" as a multiplicator of stop distance to calculate the limit distance. "Limit value" = 2 will set the limit 2 times as far as the stop.
- High/low. The highest/lowest rate will be found in "Limit value" bars back and used as a limit.
Trailing limit, Trailing limit trigger in pips, Trailing limit step in pips
Defines trailing for the limit
- Off. No trailing will be performed.
- Favorable. The trailing will be started after "Trailing limit trigger in pips" in profit. This option will move the limit when the price goes in a favorable direction. The limit will be hit in case of fast movement only.
- Unfavorable. The trailing will be started after "Trailing limit trigger in pips" in profit. This option will move the limit in the direction of the loss when the prices go in an unfavorable direction.
Breakeven parameters
Use breakeven
Enables/disable the breakeven feature.
Breakeven activation value, in pips
The level of profit when the breakeven action will be executed.
Breakeven to, in pips
The level where the stop should be moved on breakeven activation.
Trailing after breakeven
Breakeven may set the trailing on activation. This allows you to create a trade without the stop trailing but start trailing when the stop will be moved on the breakeven level. Or you can leave it unchanged.
Partial close on breakeven, Partial close amount %
You can partially close the position when the breakeven will be activated.
Time parameters
Convert the date to
Defines the timezone of the dates/times.
Start/Stop time for trading
Defines the time range when the trading allowed.
Use mandatory closing, Mandatory closing time, Valid interval for operation in seconds
Allows closing of all trades at the specified time. The strategy will attempt to close these positions after the specified time but not longer that "Valid internal". This option uses a timer to check, but in case of connectivity issues, it can jump over the specified time without execution. That's why we need the "Valid interval" parameter.
Alert parameters
Convert the date to
This option allows you to select timezone to use in the messages. The strategy will format dates in the messages in that selected timezone.
Show Alert
The strategy will show you a dialog with the alert when this option enabled.
Play sound
The strategy will play a sound on alert. Used with "Sound file" and "Recurrent sound" parameters.
Sound file
Sound file to play when the alert detected.
Recurrent sound
The strategy will play the sound in a loop when this option enabled.
Send email
The strategy will send you an email when this option enabled. Used with "Email" parameter.
Email to send the alert to.
Print into log
The strategy can print the alerts into the FXTS2 log window.
DDE Export, Service name, DDE Topic
Allows exporting alerts using DDE. This way you can get alerts into your Excel file.
Telegram/Discord/Other platforms parameters
Send advanced alert, advanced alert key
Allows sending alerts into the Telegram, Discord and other platforms. More Information
Trade coping
Send command to another platform, Platform key
Allows sending order execution commands to other platforms. More Information
Add log info to signals, Log file (csv)
Allows debugging of the strategy. When enabled all actions of the strategy will be logged into the CSV file.