Create strategies codes with ChatGPT for ProRealTime
Forums › ProRealTime English forum › General trading discussions › Create strategies codes with ChatGPT for ProRealTime
- This topic has 80 replies, 21 voices, and was last updated 23 hours ago by
crankbuddy.
-
-
07/31/2024 at 2:57 PM #235975
Links work for me.
Are you on paid subscription to gpt?
07/31/2024 at 3:20 PM #23597707/26/2025 at 2:05 PM #249117Have anyone tried coding using the Microsoft Copilot+ PC? Is it usefull for ProBuilder?
As I understand it, its a built in Chat GPT in microsoft, or in some Microsoft tools.
Is it even possible to use the ProRealCode integration with it, or is it better to stick with the standalone Chat GPT?
07/27/2025 at 12:56 PM #249135ProRealCode has no integration with AI currently.
07/29/2025 at 12:54 PM #249194I have used AI/ChatGPT a bit lately, summarizing trading books and creating strategies from that book for me. For that use case it works really nice! Included strategies down below are from the trading book “Long term secrets to short term trading” by Larry Williams. Have fun, and please share any refinements or proper strategies based on these 🙂
1. 1-2-3 Low Reversal1234567891011121314151617// 1. 1-2-3 Low Reversaldefparam cumulateorders = false// 1-2-3 Low setupif low[2] < low[3] and high[1] > low[2] and low < low[2] thenbuyTrigger = high[1]endifif not onmarket and close crosses over buyTrigger thenbuy 1 contract at marketentryBar = barindexendif// Exit after 2 daysif onmarket and (barindex - entryBar) >= 2 thensell at marketendif2. Oops! Trade1234567891011121314151617//2. Oops! Tradedefparam cumulateorders = false// Oops! Tradeif (open < low[1]) and (close > low[1]) thenbuy 1 contract at marketentryBar = barindexendif// Exit: 1% profit or closetargetPrice = tradeprice(1) * 1.01if onmarket and close >= targetPrice thensell at marketendifif onmarket and barindex = entryBar + 1 thensell at marketendifAnti Setup (NR4 Breakout)12345678910111213141516171819//Anti Setup (NR4 Breakout)defparam cumulateorders = falserange = high - lownr4 = range < range[1] and range < range[2] and range < range[3]if nr4 thenbuyTrigger = high + 0.1sellTrigger = low - 0.1buy 1 contract at buyTrigger stopsellshort 1 contract at sellTrigger stopentryBar = barindexendif// Exit after 2 daysif onmarket and (barindex - entryBar) >= 2 thensell at marketexitshort at marketendifMonday Reversal12345678910111213//Monday Reversaldefparam cumulateorders = falsemondayDown = (dayofweek = 1 and close < open)if mondayDown and dayofweek = 2 and close > open thenbuy 1 contract at marketentryBar = barindexendif// Exit after 2 daysif onmarket and (barindex - entryBar) >= 3 thensell at marketendifInside Day + Narrow Range1234567891011121314151617181920//Inside Day + Narrow Rangedefparam cumulateorders = falseMyrange = high - lowinsideDay = high < high[1] and low > low[1]narrow = Myrange < Myrange[1]if insideDay and narrow thenbuyTrigger = high + 0.1sellTrigger = low - 0.1buy 1 contract at buyTrigger stopsellshort 1 contract at sellTrigger stopentryBar = barindexendif// Exit after 2 daysif onmarket and (barindex - entryBar) >= 2 thensell at marketexitshort at marketendif5 users thanked author for this post.
08/04/2025 at 1:09 AM #249319I have used AI/ChatGPT a bit lately, summarizing trading books and creating strategies from that book for me. For that use case it works really nice! Included strategies down below are from the trading book “Long term secrets to short term trading” by Larry Williams. Have fun, and please share any refinements or proper strategies based on these 🙂
// 1. 1-2-3 Low Reversal
defparam cumulateorders = false// 1-2-3 Low setup
if low[2] < low[3] and high[1] > low[2] and low < low[2] then
buyTrigger = high[1]
endifif not onmarket and close crosses over buyTrigger then
buy 1 contract at market
entryBar = barindex
endif// Exit after 2 days
if onmarket and (barindex – entryBar) >= 2 then
sell at market
endif// I did a backtest and liked this code. I have added a short and did some updates. it shows promis and I will backtest on live data for a few days and see if I can refine it a bit more. 1H Timeframe
// === SETTINGS ===
DEFPARAM CumulateOrders = False// === VARIABLES ===
if barindex = 0 then
entryBar = 0
buyTrigger = 0.0
sellTrigger = 0.0
endif// === 1-2-3 LOW REVERSAL SETUP (LONG) ===
if low[2] < low[3] AND high[1] > low[2] AND low < low[2] THEN buyTrigger = high[1] endif // === 1-2-3 HIGH REVERSAL SETUP (SHORT) === if high[2] > high[3] AND low[1] < high[2] AND high > high[2] THEN
sellTrigger = low[1]
endif// === LONG ENTRY ===
if NOT onmarket AND close crosses over buyTrigger THEN
buy 10 CONTRACT AT MARKET
entryBar = barindex
endif// === SHORT ENTRY ===
if NOT onmarket AND close crosses under sellTrigger THEN
sellshort 10 CONTRACT AT MARKET
entryBar = barindex
endif// === LONG EXIT ===
if LONGONMARKET AND (barindex – entryBar) >= 20 AND close > tradeprice THEN
sell AT MARKET
endif// === SHORT EXIT ===
if SHORTONMARKET AND (barindex – entryBar) >= 20 AND close < tradeprice THEN exitshort AT MARKET endif3 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on