Using chatgpt to create a trading strategy?

The following video seems to show that using Chatgpt it can automatically write code for an Arduino.

Wouldn’t it be funny if this AI could create original trading strategies?

Lol was just wondering how long it will take for someone to write about ChatGPT here :joy:

Experiments in other forums are already running, but leading to nonsense.
Even if chatGPT would be successful, you have to evaluate the code. So it’s important to be familiar with the MT4/MT5 language. Still no easy way. Even with an AI.

Yes exactly! Human interference is still needed.

I just tried asking chat GPT if it could create for me a basic trading robot that runs using metatrader 4 and following is the response that it gave me:…

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
#property copyright “Copyright 2023, OpenAI”
#property link “https://www.OpenAI.com
#property version “1.00”
#property strict

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
input int MA_Period_Fast=20;
input int MA_Period_Slow=50;

//±-----------------------------------------------------------------+
//| Expert initialization function |
//±-----------------------------------------------------------------+
int OnInit()
{
//—
return(INIT_SUCCEEDED);
}
//±-----------------------------------------------------------------+
//| Expert deinitialization function |
//±-----------------------------------------------------------------+
void OnDeinit(const int reason)
{
//—
}
//±-----------------------------------------------------------------+
//| Expert tick function |
//±-----------------------------------------------------------------+
void OnTick()
{
double MA_Fast=iMA(NULL,0,MA_Period_Fast,0,MODE_SMA,PRICE_CLOSE,0);
double MA_Slow=iMA(NULL,0,MA_Period_Slow,0,MODE_SMA,PRICE_CLOSE,0);

if(MA_Fast>MA_Slow)
{
if(OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,“My EA”,16384,0,clrGreen)<0)
Alert(“OrderSend BUY error #”,GetLastError());
}
else if(MA_Fast<MA_Slow)
{
if(OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,“My EA”,16384,0,clrRed)<0)
Alert(“OrderSend SELL error #”,GetLastError());
}
}
//±-----------------------------------------------------------------+

The exact question I asked of chatgpt:

Can you write for me a basic trading robot that will run using metatrader 4

And? Is the code working? :slight_smile:

Chatgpt wrote a basic twenty line “hello world” trading bot template.

No, it is not a complete program.

But I found it interesting.