Investment Strategies with AI and Algorithmic Trading

At Wealth Expo Peru 2025, Felipe Salamanca, VIP Manager at CXM, showed how artificial intelligence (AI) is revolutionizing algorithmic trading and demonstrated live that even the free version of ChatGPT is enough to build a functional strategy. The goal: to reveal a starting point that, with iteration and testing, can scale into far more powerful tools.

The presentation began by emphasizing that AI permeates every sector and is redefining data analysis. In finance, algorithms process millions of quotes in milliseconds, detect hidden patterns, and execute orders without human emotional bias.

It is no coincidence that major banks, the primary liquidity providers for brokers, use these models to move the market in their favor. Understanding this backdrop is crucial before designing your own algorithm: if liquidity is concentrated in institutional hands, our model must anticipate (or at least respect) those flows.

How to Build a Strategy with ChatGPT?

Step 1: Define the idea and gather data
Everything starts with a simple hypothesis: “when the RSI crosses above its moving average, the price tends to rise.” With historical feeds from TradingView or FinViz, you collect the data that will feed the algorithm. ChatGPT helps translate the hypothesis into clear rules.

Step 2: Design rules and parameters
Indicators, time windows, entry levels, take profit, and stop loss are set. Here, ChatGPT—through prompt engineering—generates a Pine Script draft that reflects those exact conditions.

Step 3: Program and debug the script
The code is pasted into TradingView’s editor. Syntax errors are inevitable; you just go back to ChatGPT, explain the issue, and get the correction in seconds. The “free” model becomes an almost real-time programming assistant.

Step 4: Backtesting and optimization
With the compiled script, a backtest is run across different timeframes (1h, 4h, 1d). Results reveal profit ratios, drawdown, and sensitivity to volatility. Adjusting parameters and retesting is a continuous cycle until acceptable performance is achieved.

Step 5: Live implementation and monitoring
Once activated, TradingView sends alerts or executes automated orders via the broker’s API. The trader must monitor latency, slippage, and above all, liquidity spikes caused by banks and institutions that can invalidate signals within seconds.

Step 6: Learning and scaling
The initial strategy, built with free ChatGPT, serves as a “minimum viable product.” With more data and computing power (GPT-4o, machine learning libraries), filters such as sentiment, order book depth, or neural networks that detect market regimes can be added.

Conclusion

AI is no longer an exclusive privilege of investment banks: any investor can start with ChatGPT, refine a script in TradingView, and validate their idea through backtesting. The key is recognizing that liquidity providers still set the market’s pace; our algorithms must coexist—not compete—with that power.

As Felipe Salamanca emphasized, investing with AI means combining human creativity and algorithmic discipline to trade intelligently, even when the market is driven by giants.

Watch the full conference in Spanish here.

EXCELLENT REVIEWS IN
trust pilot logo
vix
VIX
16.42 / 17.02
gbpusd
GBPUSD
1.35030 / 1.35033
eurusd
EURUSD
1.17153 / 1.17156
us
US30
45417.55 / 45419.35
nas
NAS100
23624.80 / 23626.30
ger
GER30
23648.90 / 23650.60
xauusd
XAUUSD
3594.50 / 3594.55
xagusd
XAGUSD
40.924 / 40.949
ethusd
ETHUSD
4304.27 / 4306.18
btcusd
BTCUSD
111161.60 / 111206.70
ukoil
USOIL
61.726 / 61.760
ukoil
UKOIL
65.476 / 65.525