Filed under [[:fsb:start]] >> [[:fsb:articles]] ====== Exporting a Strategy as an Indicator ====== The new "Export the Strategy as a Custom Indicator" function saves your whole current strategy as a static data filter that can be instantly used as an indicator to allow trades in other strategies. ( Find it in **Tools** -> **Custom Indicators** -> **Export the Strategy as a Custom Indicator**) {{ :fsb:export_strategy_as_ci.png |Export the Strategy as a Custom Indicator}} ===== Usage ===== * When testing multicurrency strategies. * When testing strategies using more than one time periods. * When searching for correlations between different financial instruments. * When you determine the trend based on a longer time period then the one you trade on. ===== Important! ===== * This filter works only for the same period as the strategy we have exported it from. For example if we export a strategy tested for the period between May 2006 and May 2009 then the filter we've created will have signals only for bars inside that period (regardless of their length - 1day, 1hour, 15min etc). So even if we add new data, for June 2009 for example, no signals will be raised for the extra data after May 2009. That is why we'll call the exported strategy a //static// filter/indicator. * The exported strategy can only be used as an "Opening Logic Condition". * The exported strategy becomes a //static// filter, meaning that the signals cannot change after we save it. * The signals are set based on the strategy we export - for every bar in the strategy that holds a long position a buy signal is raised by the filter. * And for every bar in the strategy holding a short position a sell signal is raised. * And for those bars during which we are out of the market, no signals are raised. * The exported strategy is saved as an indicator in the "Custom Indicators" folder and is instantly loaded in the program. * If we want to use the the newly created static indicator for a market that has an opposite currency pair (EURUSD -> USDGBP), we can reverse the signals using the "Reversed signals" check box. {{ :fsb:reversed_signals.png |Reversed signals}} ===== Example ===== Example:We want to create а trend following strategy that uses a longer time period of the same currency pair to determine the trend. So we'll use EURUSD 1day data to determine the trend and then we'll export the results as a filter and use it on a EURUSD 1Hour data as a trend indicator. 1. First we want to get the general trend (EURUSD 1Day). To do so we create a simple strategy that follows the trend like the one on the picture. {{ :fsb:base_strategy.png |Base Strategy}} We set our entry rules to ADX > 30 and MACD Line > 0 for a long position. FSB will automatically set the short entry rules to ADX > 30 and MACD Line < 0 (the ADX rule is the same for long and short position because it only shows the strength of the trend and not the direction, we use MACD line to determine the direction). 2. Now we have a strategy that determines the trend and gives signals for its direction. In order to use those signals for shorter time periods we need to //export the strategy//. To do so we choose "Export the Strategy as a Custom Indicator" from the //Tools>Custom Indicators menu// and we are asked to name the new indicator we've created. We'll call it "Trend EUR 1D". Now the strategy is automatically saved in the "Custom Indicators" folder as a custom indicator and is instantly loaded in the indicators list of FSB. 3. Now we are ready to create a new strategy using different time periods but still use the signals we got from the EURUSD 1Day data. To do so we just change the time periods (or the currency pair if we want) and find the newly created //Trend EUR 1D// indicator in the indicators list and double click on it: {{ :fsb:trend_eur_1d.png |Indicator from a strategy}} Then we add new conditions and indicators: {{ :fsb:strategy_eur_1h.png |Strategy EURUSD 1D}} Now we have a strategy working on the EURUSD 1Hour data but using EURUSD 1Day data to determine the trend (thanks to the newly created Trend EUR 1D indicator) and use it as an "Opening Logic Condition". We can use the same method to get signals from different time periods or currency pairs for our strategy, the possibilities are unlimited.