# Fetching Information Source: https://docs.luxalgo.com/docs/ai-backtesting/fetching-information ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/backtesting-assistant/fetching-information/smart_trail.png) The AI Backtesting Assistant is able to fetch our product documentation to provide relevant information to you about the features used by a retrieved strategy or to simply help you learn more about our products. The AI will automatically determine whether it requires fetching context from the documentation depending on the user query. You can force the AI to fetch information from the documentation by telling it to fetch the documentation. For example: > Tell me more about confirmation signals, use the documentation This can prevent the AI from giving partial information he might know from his existing context window. ## Detailed Strategy Descriptions Using Docs ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/backtesting-assistant/fetching-information/explanation.png) We can request for the AI to provide important context about the conditions returned by a trading strategy. ## Using Docs to Get Tailored Strategies By asking the AI to learn more about the LuxAlgo features from the documentation, we can effectively get unique trading strategies by simply mentioning trading styles. For example, we can use the following prompt: > From the documentation search for the best features for swing trading, then find a strategy using those features that provides good results on crypto on the hourly timeframe # Fetching Strategies Source: https://docs.luxalgo.com/docs/ai-backtesting/fetching-strategies ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/ai-backtesting/fetching-strategies/chat.png) The primary role of the AI Backtesting Assistant is to help users find strategies quickly without having to iterate through various conditions, tickers, and timeframes on TradingView charts. Instead, users can simply ask the AI to look for the strategy that would best match the criteria they want. The AI Backtesting Assistant has access to thousands of unique strategies, half using our S\&O toolkit and the other half using our PAC toolkit. This AI tool’s backtesting data & analytics are for informational purposes only and do not constitute financial advice or recommendations to buy or sell any financial product, including but not limited to securities, derivatives, cryptocurrencies, or other investment instruments. This tool may contain errors, and past performance is not indicative of future results. Always conduct your own research and consult with a professional financial advisor. LuxAlgo is not liable for any decisions made based on any information given. Read our [full disclaimer](https://www.luxalgo.com/legal/disclaimer/). ## Strategies Configuration Strategies accessible by the AI Backtesting Assistant are backtested using an initial capital of 10,000\$, without commissions/slippage, and using default settings (except for the PAC which uses a different invalidation behavior). Unit position sizing is used across all tickers, except forex pairs which use a standard lot (100,000 units). The strategies the AI can access don't use every single one of the features within the toolkits, see the section below to learn more about the supported tickers, timeframes, and backtesting conditions. Strategies do note make use of stop losses or take profits. ### Supported Tickers The following tickers are supported: | Ticker | Position Size | | ------ | ------------- | | EURUSD | 100,000 | | GBPUSD | 100,000 | | AUDUSD | 100,000 | | USDCHF | 100,000 | | NZDUSD | 100,000 | | EURGBP | 100,000 | | EURAUD | 100,000 | | GBPAUD | 100,000 | | USDJPY | 1,000 | | GBPJPY | 1,000 | | AUDJPY | 1,000 | | Ticker | Position Size | | ------ | ------------- | | TSLA | 100 | | META | 100 | | NVDA | 100 | | AAPL | 100 | | AMZN | 100 | | AMD | 100 | | GOOG | 100 | | SOFI | 100 | | DIS | 100 | | MSFT | 100 | | INTC | 100 | | PYPL | 100 | | NFLX | 100 | | PLTR | 100 | | SMCI | 100 | | MSTR | 100 | | COIN | 100 | | CELH | 100 | | UBER | 100 | | HOOD | 100 | | DUOL | 100 | | BABA | 100 | | WMT | 100 | | ORCL | 100 | | CRWD | 100 | | RIVN | 100 | | NKE | 100 | | SNOW | 100 | | MA | 100 | | GME | 400 | | Ticker | Position Size | | ------ | ------------- | | SPY | 100 | | QQQ | 100 | | IWM | 100 | | VTI | 100 | | ARKK | 100 | | Ticker | Position Size | | -------- | ------------- | | BTCUSD | 1 | | BCHUSD | 10 | | XMRUSD | 100 | | ETHUSD | 100 | | SOLUSD | 100 | | LTCUSD | 100 | | LINKUSD | 100 | | AAVEUSD | 100 | | AVAXUSD | 100 | | ATOMUSD | 1,000 | | TONUSD | 1,000 | | HYPEUSD | 1,000 | | DOTUSD | 1,000 | | EOSUSD | 10,000 | | XRPUSD | 10,000 | | MATICUSD | 10,000 | | ADAUSD | 10,000 | | SUIUSD | 10,000 | | ALGOUSD | 10,000 | | JUPUSD | 10,000 | | TRXUSD | 10,000 | | XLMUSD | 10,000 | | HBARUSD | 100,000 | | DOGEUSD | 100,000 | | VETUSD | 100,000 | | KASUSD | 1,000,000 | | SMARTUSD | 10,000,000 | | SHIBUSD | 100,000,000 | | Ticker | Position Size | | ------ | ------------- | | XAU | 100 | | BRN | 1,000 | | XAG | 1,000 | | WTI | 1,000 | | NATGAS | 1,000 | | Ticker | Position Size | | ------ | ------------- | | YM | 5 | | NQ | 20 | | ES | 50 | | RTY | 50 | | PL1! | 50 | | GC | 100 | | CL | 1,000 | | SI1! | 5,000 | | ZC | 5,000 | | ZW | 5,000 | | ZS | 5,000 | | NG | 10,000 | | 6E | 125,000 | | 6J | 12,500,000 | Futures use electronic trading hours (ETH). ### Supported Timeframes 5m, 15m, and 60m timeframes are supported. *** ### Classics Conditions Our AI can fetch strategies constructed from a wide variety of classical indicators including: * EMA (Exponential Moving Average, using periods 20, 50, 200) * SuperTrend * VWAP (Volume Weighted Average Price) * Ichimoku * Linear Regression * Bollinger Bands * Donchian Channel * Aroon * RSI (Relative Strength Index) * MFI (Money Flow Index) * Stochastic * MACD (Moving Average Convergence Divergence) * Volume * Volume Delta Classic indicator settings use Tradingview defaults. AI strategies constructed from classical indicators use a single **trigger** and a combination of up to two **filters** for the long and short entry conditions. These conditions are listed out below. #### Triggers Triggers determine the initial conditions used by a strategy. These tend to be less persistent events on a chart, occurring for a single bar. * EMA(20) Cross Over EMA(50) * EMA(50) Cross Over EMA(200) * Price Cross Over SuperTrend * Price Cross Over VWAP * Tenkan-sen Cross Over Kijun-sen * Price Cross Over Kumo Cloud * Linear Regression Slope Switch Upward * Price Cross Over Upper BB (Bollinger Bands) * DC(20) New Higher High (Donchian Channel) * Aroon Switch Bullish * RSI Cross Over 70 * MFI Cross Over 80 * Stochastic %K Cross Over 80 * Stochastic %K Cross Over %D * MACD Cross Over 0 * MACD Cross Over Signal * EMA(20) Cross Under EMA(50) * EMA(50) Cross Under EMA(200) * Price Cross Under SuperTrend * Price Cross Under VWAP * Tenkan-sen Cross Under Kijun-sen * Price Cross Under Kumo Cloud * Linear Regression Slope Switch Downward * Price Cross Under Lower BB (Bollinger Bands) * DC(20) New Lower Low (Donchian Channel) * Aroon Switch Bearish * RSI Cross Under 30 * MFI Cross Under 20 * Stochastic %K Cross Under 20 * Stochastic %K Cross Under %D * MACD Cross Under 0 * MACD Cross Under Signal #### Filters Filters add precision to a strategy, potentially filtering out bad trades that would have been taken by simply using triggers. Filters tend to be more persistent, lasting for multiple bars on a chart. * Price Above EMA(20) * Price Above EMA(50) * Price Above EMA(200) * Price Above SuperTrend * Price Above VWAP * Span A Above Span B (Ichimoku) * Linear Regression Slope Upward * Price Above Upper BB (Bollinger Bands) * DC(20) Uptrending (Donchian Channel) * MACD Above 0 * MACD Histogram Above 0 * Volume Above SMA(20) * Bullish Volume Delta * Price Below EMA(20) * Price Below EMA(50) * Price Below EMA(200) * Price Below SuperTrend * Price Below VWAP * Span A Below Span B (Ichimoku) * Linear Regression Slope Downward * Price Below Lower BB (Bollinger Bands) * DC(20) Downtrending (Donchian Channel) * MACD Below 0 * MACD Histogram Below 0 * Bearish Volume Delta *** ### Signals & Overlays Conditions AI strategies constructed from our Signals & Overlays (S\&O) toolkit use a single **trigger** and a combination of up to two **filters** for the long and short entry conditions. These conditions are listed out below. #### Triggers Triggers determine the initial conditions used by a strategy. These tend to be less persistent events on a chart, occurring for a single bar. * Confirmation Any Bullish * Confirmation Normal Bullish * Confirmation Strong Bullish * Contrarian Any Bullish * Contrarian Normal Bullish * Contrarian Strong Bullish * Price Cross Over Smart Trail * Price Cross Over Reversal Zones R1 * Trend Tracer Switch Bullish * Trend Catcher Switch Bullish * Neo Cloud Switch Bullish * Confirmation Any Bearish * Confirmation Normal Bearish * Confirmation Strong Bearish * Contrarian Any Bearish * Contrarian Normal Bearish * Contrarian Strong Bearish * Price Cross Under Smart Trail * Price Cross Under Reversal Zones S1 * Trend Tracer Switch Bearish * Trend Catcher Switch Bearish * Neo Cloud Switch Bearish #### Filters Filters add precision to a strategy, potentially filtering out bad trades that would have been taken by simply using triggers. Filters tend to be more persistent, lasting for multiple bars on a chart. * Confirmation Uptrend * Contrarian Uptrend * Price Over Smart Trail * Price Over Reversal Zones R1 * Trend Tracer Bullish * Trend Catcher Bullish * Neo Cloud Bullish * Confirmation Downtrend * Contrarian Downtrend * Price Under Smart Trail * Price Under Reversal Zones S1 * Trend Tracer Bearish * Trend Catcher Bearish * Neo Cloud Bearish * Trend Strength Trending (Trend Strength greater than 50) * Trend Strength Ranging (Trend Strength lower than 50) It is possible for a long/short entry condition to contain both bullish and bearish conditions #### Exits Strategies using the S\&O toolkit can make exit trades which are outlined below: * Confirmation Signals can make use of builtin-exits labelled as "Confirmation Built-in Exits". * Contrarian Signals can make use of builtin-exits labelled as "Contrarian Builtin Exits". * Reversal Zones can make use of the exit condition "Price Cross R1/S1 Average", which will exit a trade when price crosses the average of the Reversal Zones. *** ### Oscillator Matrix Conditions AI strategies constructed from our Oscillator Matrix (OSC) toolkit use a single **trigger** and a combination of up to two **filters** for the long and short entry conditions. These conditions are listed out below. #### Triggers Triggers determine the initial conditions used by a strategy. These tend to be less persistent events on a chart, occurring for a single bar. * Money Flow Crossing Over 80 * Money Flow Crossing Over 50 * Money Flow Starts Increasing (Money FLow is greater than its previous value while previously downtrending) * HyperWave Regular Bullish Signal * HyperWave Oversold Bullish Signal * HyperWave Crossing Over 80 * HyperWave Crossing Over 50 * Reversal Any Up * New HyperWave Bullish Divergences * Money Flow Crossing Under 20 * Money Flow Crossing Under 50 * Money Flow Starts Decreasing (Money Flow is lower than its previous value while previously uptrending) * HyperWave Regular Bearish Signal * HyperWave Overbought Bearish Signal * HyperWave Crossing Under 20 * HyperWave Crossing Under 50 * Reversal Any Down * New HyperWave Bearish Divergences #### Filters Filters add precision to a strategy, potentially filtering out bad trades that would have been taken by simply using triggers. Filters tend to be more persistent, lasting for multiple bars on a chart. * Money Flow Above 80 * Money Flow Above 50 * Money Flow Increasing * HyperWave Above 80 * HyperWave Above 50 * Strong Bullish Confluence * Weak Bullish Confluence * Money Flow Below 20 * Money Flow Below 50 * Money Flow Decreasing * HyperWave Below 20 * HyperWave Below 50 * Strong Bearish Confluence * Weak Bearish Confluence It is possible for a long/short entry condition to contain both bullish and bearish conditions *** ### Price Action Concepts Conditions Strategies based on our Price Action Concepts toolkit (PAC) are based on sequences, entering a position when a sequence is completed without any repeated steps. PAC strategies can use a maximum of three steps. #### Steps * Bullish CHoCH (Change Of Character) * Bullish BOS (Break of Structure) * Entered Bullish OB (Order Block) * Exit Bearish OB (Order Block) * New Bullish FVG (Fair Value Gap) * Mitigated Bearish FVG (Fair Value Gap) * New Bullish Opening Gap * Mitigated Bearish Opening Gap * New Bullish Volume Imbalance * Mitigated Bearish Volume Imbalance * Bullish Liquidity Grab * Downtrending Trendline Break * Bearish CHoCH (Change Of Character) * Bearish BOS (Break of Structure) * Entered Bearish OB (Order Block) * Exit Bullish OB (Order Block) * New Bearish FVG (Fair Value Gap) * Mitigated Bullish FVG (Fair Value Gap) * New Bearish Opening Gap * Mitigated Bearish Opening Gap * New Bearish Volume Imbalance * Mitigated Bullish Volume Imbalance * Bearish Liquidity Grab * Uptrending Trendline Break Price Action Concepts strategies do not make use of any exit conditions. ## How To Fetch Strategies ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/ai-backtesting/fetching-strategies/landing.png) Interacting with the AI Backtesting Assistant is straightforward. All users need to do is type a prompt in the chat box located at the bottom of their screen. Here are examples of prompts that will trigger the AI Backtesting Assistant to retrieve a trading strategy: * What is the best performing strategy across all crypto tickers on the 5-minute timeframe? * Give me three strategies using fair value gaps that have a winrate above 80%. * Find a strategy with above average net profit but below average drawdown. Users can also click on one of the suggested prompts in the search group located above the input prompt. The AI can access the following backtesting results for strategies: * Net Profit * Max Net Profit * Closed Trades * Winning Trades * Losing Trades * Winrate * Gross Profit * Gross Loss * Profit Factor * Max Drawdown * Max Drawdown Percent * Average Trade * Average Winning Trade * Average Losing Trade ![Strategy Results](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/ai-backtesting/fetching-strategies/table.png) These results will be returned in a table display within the chat. If multiple strategies are returned, they will all be located within that table. The AI can occasionally fetch strategies in the middle of a response; this will return another table containing the strategies fetched. A maximum of 3 strategies can be returned in a table at once, while a maximum of three strategies can be returned from a single fetching operation. If the AI needs to fetch more than 3 strategies it will fetch strategies in parallel. The AI has also access to the following information from a strategy: * Strategy start time: When the strategy started being evaluated * Strategy current position (long, short, or none) ### Fetch Statistics Across The Entire Strategy Population ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/ai-backtesting/fetching-strategies/compare.png) The AI can also get general statistics and data across the whole population of strategies being backtested. Example of prompts doing this are: * What is the total net profit of all bitcoin strategies you have? * On BTCUSD, are strategies using normal Confirmation signals better than the ones using strong Confirmation signals overall? * What is total net profit of profitable strategies across stocks? This can be useful to get big picture information about strategies. Do note that such prompts can lead to high wait time for the results. ## Add a Strategy to Your Chart Once you get a strategy you like from our AI, you may be inclined to add it to your chart to visualize it & further optimize its results on TradingView. To do so, follow these steps: Go to your TradingView chart, then open the indicator menu, locate the Backtester of the Toolkit related to the strategy you want to add. For example, if you found a strategy with our AI Backtesting Assistant that used Signals & Overlays, you would add the "Backtester (S\&O)" strategy script to your TradingView chart. Go in the Backtester's settings, then select "Date" in the "Backtest Window" setting, then adjust "Window Start" with the strategy start time provided by AI. Adjust the long and short entry conditions in the backtester based on the conditions returned by the AI. Make sure to use "Invalidate On Any Repeated Step" in the "Invalidation behavior" dropdowns for PAC strategies. We compute strategies using our own data, which can differ from the one on Tradingview. Users might not be able to reproduce exact strategy results due to the limitation on how much data certain users can access. ## Saving Strategies ![](https://mintlify.s3.us-west-1.amazonaws.com/luxalgo/public/images/ai-backtesting/fetching-strategies/saving.png) Users can export strategies displayed within a table as a csv using the download icon located under it. ## Prompting Tips The AI can make mistakes when fetching strategies, as this is a very complex process depending on the user query. We will always aim to improve the AI Backtesting Assistant over time; however, the following tips can help you get the most from our AI. ### Make Detailed Queries Make sure to detail every aspect of the strategy you want to fetch if you have a precise one in mind, for example: | Original | Improved | | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | | Fetch a strategy that uses Confirmation Signals | Fetch a strategy that only uses Confirmation Signals and no other conditions | | I want a PAC strategy that goes long on a new FVG, and CHoCH | I want a PAC strategy that goes long when:

- Step 1: a new bullish FVG occur
- Step 2: a bullish CHoCH occur | | I want the best strategy | I want the strategy with the highest net profit on BTCUSDT 5 minute | Context and details will help the AI avoid making guesses about your query. ### Encourage the AI to Improve The AI Backtesting Assistant can be fairly self-aware if a fetched strategy doesn't meet a user criteria, and will then retry. But if the AI response is clearly mistaken, then it can be good to let it know using a prompt encouraging re-evaluation of the fetching process: > The strategy your returned is not the one I want. Correct the issue in your fetching process and retry to fetch the strategy in accordance with my query. ### Split Complex Queries Into Multiple Tasks The AI will be more prone to mistakes if the query is complex, as such, it is best to do follow-up messages asking about the details of a strategy rather than asking the AI to give those alongside other information. For example: > Return a good strategy on BTCUSD, alongside the average net profit of all strategies on BTCUSD that use Confirmation signals, then tell me what the highest winrate strategy is, using the same conditions as the first one The AI Backtesting Assistant might provide more relevant answers if we let context accumulate by splitting and re-ordering our initial query into multiple ones: Return a good strategy on BTCUSD Find the strategy with the highest winrate that use the same exact entry conditions returned previously Return the average net profit of all strategies on BTCUSD that use Confirmation Signals. # Introduction Source: https://docs.luxalgo.com/docs/ai-backtesting/introduction