• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 6:33pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 6:33pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

which fibonn was vegas talking about? 1 reply

Changing Your Self Talk By Talking to Yourself 2 replies

My left brain starts talking to me 7 replies

talking to myself(smile) 8 replies

  • Trading Discussion
  • /
  • Reply to Thread
  • Subscribe
  • 64
Attachments: AI talking
Exit Attachments
Tags: AI talking
Cancel

AI talking

  • Last Post
  •  
  • 1 3456Page 7 8
  • 1 56Page 7 8
  •  
  • Post #121
  • Quote
  • Feb 27, 2023 4:20pm Feb 27, 2023 4:20pm
  •  ryuryu
  • Joined Apr 2020 | Status: Member | 1,828 Posts
Quoting joyny
Disliked
{quote} Here how AI drawdowns look.. 80 days sit in DD.. that's real trading
Ignored
That's right, it has an eternity ahead
Observer effect
 
 
  • Post #122
  • Quote
  • Feb 27, 2023 4:49pm Feb 27, 2023 4:49pm
  •  dantpm
  • Joined Aug 2022 | Status: Member | 2,492 Posts
Quoting joyny
Disliked
Won't use python AIs.. no stable results found. I will use the simple neurons which is possible to implement directly in the MQL5 expert advisor and use optimizations to find neuron weights.
Ignored
Did you consider trying the TensorFlow stock price prediction algorithm? It is on the TensorFlow website and is able to predict stock prices several months in advance. My thought was that it would be pretty simple to amend the code for Forex and shorter timeframes.
It does use Python with the TensorFlow software so that might be an issue.
 
 
  • Post #123
  • Quote
  • Feb 27, 2023 11:07pm Feb 27, 2023 11:07pm
  •  jonstewart
  • | Joined Jan 2022 | Status: Member | 100 Posts
I would say that AI trading is a massive success of modern technology. But still now I think traders should stay disengaged from AI trading. It’s my opinion because AI works based on its program and it won’t match with the thoughts and psychology of human being.
 
 
  • Post #124
  • Quote
  • Feb 28, 2023 6:51am Feb 28, 2023 6:51am
  •  AbdullahBin
  • | Joined Jan 2022 | Status: Member | 69 Posts
AI trading will certainty reduce the level of your mental burden but my question is- Is reduction of fund better than losing your capital? There are several AIs in use by traders but not all of them are effective for generating better result. So take your decision carefully.
 
 
  • Post #125
  • Quote
  • Edited 1:20am Mar 1, 2023 12:39am | Edited 1:20am
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting ryuryu
Disliked
{quote} That's right, it has an eternity ahead
Ignored
It is needed min 3 years track record to attract investors money.

For example here 1 trader account operating more than 4 years now attracted 16mil usd capital. As we can see it had 6 months in drawdown.

Attached Image (click to enlarge)
Click to Enlarge

Name: IMG_20230301_073114.jpg
Size: 142 KB

3 to 5 years trading to get impressive track record is not so long.

He make on average 25% yearly profits. It is 2x more than sp500 average yearly performance and this is quite ok for investors who want stable and safe longterm results.

Here example how it loks for investors in 10 years perspective. Compared msft vs sp500:

Attached Image (click to enlarge)
Click to Enlarge

Name: IMG_20230301_081526.jpg
Size: 245 KB

25% yearly return if consistent is very good for investors. And we see now msft shares droped significant.. forex based strategies are good alternative to diversify.
 
2
  • Post #126
  • Quote
  • Edited 2:11am Mar 1, 2023 1:50am | Edited 2:11am
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting dantpm
Disliked
{quote} Did you consider trying the TensorFlow stock price prediction algorithm? It is on the TensorFlow website and is able to predict stock prices several months in advance. My thought was that it would be pretty simple to amend the code for Forex and shorter timeframes. It does use Python with the TensorFlow software so that might be an issue.
Ignored
I did myself neural network in python with TensorFlow. But spent not much time therefore maybe can't expect results.

Maybe you talk about this TensorFlow python solution for stock price prediction?

I implemented it, made it running with Python 3.11 - as webpage is from 2017 it is obsolete.

But Ok get working. Prepared training data with this structure:

DATE,AUDNZD,EURUSD,GBPUSD,USDJPY
1675905120,1.09719,1.07128,1.20703,131.32200
1675905180,1.09723,1.07120,1.20705,131.32400
1675905240,1.09719,1.07119,1.20706,131.32300
1675905300,1.09719,1.07124,1.20687,131.33500
1675905360,1.09714,1.07128,1.20711,131.33500

Exported 20000 minutes.

So I try to predict the price of AUDNZD based on 3 other pair's prices. But this is not usable in real life. Need to prepare different training data.

And got this result:

Attached Image (click to enlarge)
Click to Enlarge

Name: tensor.png
Size: 41 KB

Need to investigate more because why chart shows 0 to 16000? I expected it shows forwardtest 20% of data and it should be 0 to 4000 instead.

I can adjust that python script to forwardtest with completely new unseen data - because maybe the author of the script did some mistakes with arrays..

And one more concern:

that example took SP500 prices and then took 500 stocks prices. Target value is SP500 price based on 500 stocks prices. what? serious? what is that of "prediction"? you just took all components of target and thats it.. maybe I didnot understand someting from his example..

Therefore I took currencies.. but the results are quite similar.

anyway need more time to analyze.

Does anybody else here does something with python?
 
1
  • Post #127
  • Quote
  • Mar 1, 2023 2:09am Mar 1, 2023 2:09am
  •  dantpm
  • Joined Aug 2022 | Status: Member | 2,492 Posts
Quoting joyny
Disliked
{quote} I did myself neural network in python with TensorFlow. But spent not much time therefore maybe can't expect results. Maybe you talk about this TensorFlow python solution for stock price prediction? I implemented it,
Ignored
Joyny, that was massively impressive!
The model that I found is this one:
https://www.thepythoncode.com/articl...ow-2-and-keras

There is another update as well published in Dec 22 but I haven't found all of the code for that one.
 
1
  • Post #128
  • Quote
  • Mar 2, 2023 11:18am Mar 2, 2023 11:18am
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Here some update on TensorFlow testing vs Python. Training data EURUSD from year 2000 H1 candles contains entries with fixed SL/TP with risk/reward 1:1 so good result would be at least 51% but better 52-53% just in case.

After epoch 7 results for unseen data (from year 2018) started to become worse:

Attached Image (click to enlarge)
Click to Enlarge

Name: tensor_results1.png
Size: 114 KB

But Epoch 7 looks promising:

Attached Image (click to enlarge)
Click to Enlarge

Name: tensor_results2.png
Size: 83 KB

Quote
Disliked
The number of epochs required to train a TensorFlow model depends on various factors, such as the complexity of the model, the size of the dataset, and the computational resources available. In general, it is recommended to train the model until the loss function converges and does not improve significantly with additional epochs.

Quote
Disliked
Seven epochs may be sufficient to train some models, but it may not be enough for others. It is important to monitor the loss function during training and validate the model's performance on a separate validation dataset. If the model achieves good performance and the loss function has converged after seven epochs, then you may use the results of the model produced with seven epochs. However, it is always a good practice to experiment with different numbers of epochs and evaluate the model's performance to ensure optimal results.

Quote
Disliked
If you have observed that the model's performance has stabilized after a certain number of epochs and the prediction accuracy does not change significantly (within +/- 1-2%), then it can be a good indication that the model is sufficiently trained and further training is not necessary. However, it is still a good practice to perform additional validation tests on a separate test dataset to ensure that the model's performance is consistent and reliable.

So, If I see that epochs 8,9 etc give worse results and constantly worse.. it seems to me it is not correct to decide to use model from epoch 7..?
 
 
  • Post #129
  • Quote
  • Mar 2, 2023 11:34am Mar 2, 2023 11:34am
  •  costos
  • Joined May 2007 | Status: Conspirator | 138 Posts
No, more epochs should only make your model be better than a smaller number of epochs of training. Depending on the underlying data you usually see that beyond a certain number of epochs you do not see much of improvement in your model's performance.
Tensorflow has nice built-in tools to show better performance with more epochs. It shows epochs, loss, accuracy. And it's usually a nice decreasing loss curve with more epochs trained. Kind of like this:
Attached Image (click to enlarge)
Click to Enlarge

Name: AwKmL.jpg
Size: 37 KB
 
1
  • Post #130
  • Quote
  • Mar 25, 2023 2:15pm Mar 25, 2023 2:15pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Returned back to MQL5 and Neural Networks which are quite easy to implement and optimize.

Anyway, all this is patterns trading and no 1 holly grail pattern here can be found even with AI.

So, did some EA which trades with 10 neurons, input data is RSI indicator, fixed SL/TP.

As we can't rely on any particular pattern found, even if that performed well 5 years and then forwardtested 5 years - will prepare an portfolio of some 10 such neural patterns.

Here first candidate EURUSD - optimized from 2013 to 2018 and then forward tested 2018 to 2023. Fixed SL/TP 0.8% (risk/reward 1:1):

Training result:

Attached Image (click to enlarge)
Click to Enlarge

Name: neural_eurusd_2013_2018.png
Size: 23 KB


And with unknown data from 2018:

Attached Image (click to enlarge)
Click to Enlarge

Name: neural_eurusd_2018_2023.png
Size: 24 KB
 
 
  • Post #131
  • Quote
  • Mar 26, 2023 7:01am Mar 26, 2023 7:01am
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting joyny
Disliked
did some EA which trades with 10 neurons, input data is RSI indicator, fixed SL/TP.
Ignored
and here is how 10 neurons work on AAPL stock trading fixed SL/TP 2%. Trained with data from 2013 till 2020.

Attached Image (click to enlarge)
Click to Enlarge

Name: appl_stock_neural.png
Size: 16 KB


Unknown data from 2020. Profits 120%, DD 36%.

Attached Image (click to enlarge)
Click to Enlarge

Name: appl_stock_neural_det.png
Size: 20 KB


If just buy&hold AAPL stock on January, 2020 then it would end up with 80% profits and 26% DD.

But EA traded shorts as well.. nobody knows where stocks would go.
 
 
  • Post #132
  • Quote
  • Mar 26, 2023 9:52am Mar 26, 2023 9:52am
  •  pizd0s
  • | Joined Dec 2021 | Status: Member | 149 Posts
While neural networks can be a powerful tool for predicting market prices, they are not always the best choice for forex trading. One reason is that neural networks can be prone to overfitting, which means they may fit too closely to historical data and perform poorly when used to predict future prices.
Additionally, neural networks can be complex and difficult to interpret, which can make it challenging for traders to understand how the model arrived at its predictions. This lack of transparency can be problematic, especially if traders are relying solely on the model's output to make trading decisions.
 
1
  • Post #133
  • Quote
  • Mar 26, 2023 1:48pm Mar 26, 2023 1:48pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting pizd0s
Disliked
While neural networks can be a powerful tool for predicting market prices, they are not always the best choice for forex trading. One reason is that neural networks can be prone to overfitting, which means they may fit too closely to historical data and perform poorly when used to predict future prices.
Ignored
provided info in previous posts of forward test with unknown data. I don't see a problem with overfitting. Trained with 5 years history, validated with 5 years in forward tests. Neurons know nothing about year 2018 till 2023 in my tests.

Quoting pizd0s
Disliked
Additionally, neural networks can be complex and difficult to interpret, which can make it challenging for traders to understand how the model arrived at its predictions. This lack of transparency can be problematic, especially if traders are relying solely on the model's output to make trading decisions.
Ignored
using weights as parameters, input data normalization, and activation function. neurons trades patterns. we won't understand how a pattern is created but it is still a pattern. with a probability of profit. when you see a pattern performed training and forward test with profitability %, then run that on a live account and expect to get something similar. re-train neurons periodically if not satisfied with particular neuron network results. combine a portfolio of such neural instances. because newer know which particular setup will succeed.
 
 
  • Post #134
  • Quote
  • Mar 28, 2023 6:10pm Mar 28, 2023 6:10pm
  •  90dayworkout
  • | Joined Sep 2022 | Status: Junior Member | 3 Posts
Very cool. I'm interested in what AI can do in forex trading. Thanks for sharing.
 
1
  • Post #135
  • Quote
  • Apr 4, 2023 3:03pm Apr 4, 2023 3:03pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Observed that AI Chat GPT-4 is really powerful and much stronger than previous AI chat versions.

Managed to make working EA on MQL5 and with much less interactions. AI now understands coding much better.

I first asked to make a skeleton. Then asked to make each part of EA. And now have a working template where I can change only 1 function for entry logic and ask AI to generate various patterns for entry logic.

Just write "another alternative" and AI prepares various entry alternatives.

Some entry function possibilities generated by AI:

Inserted Code
// EntryConditionMet
bool EntryConditionMet(ENUM_ORDER_TYPE &orderType)
{
  if (!IsTimeInRange(time_from_h, time_to_h))
  {
    Print("Trading not allowed outside of specific time span");
    return false;
  }
  
  MqlRates rates[];
  ArraySetAsSeries(rates, true);
  if (CopyRates(_Symbol, TimeFrame, 1, 4, rates) == -1)
  {
    Print("Error copying rates: ", GetLastError());
    return false;
  }
  // Check for bullish Three Bar Reversal pattern
  if (rates[2].low < rates[1].low && rates[2].low < rates[3].low && rates[0].close > rates[0].open)
  {
    orderType = ORDER_TYPE_BUY;
    return true;
  }
  // Check for bearish Three Bar Reversal pattern
  else if (rates[2].high > rates[1].high && rates[2].high > rates[3].high && rates[0].close < rates[0].open)
  {
    orderType = ORDER_TYPE_SELL;
    return true;
  }
  return false;
}

Quote
Disliked
This entry condition checks for a Three Bar Reversal pattern. If the pattern is bullish (middle bar has the lowest low and the last bar is bullish), the expert advisor will enter a long position (buy). If the pattern is bearish (middle bar has the highest high and the last bar is bearish), the expert advisor will enter a short position (sell).

Inserted Code
// EntryConditionMet
bool EntryConditionMet(ENUM_ORDER_TYPE &orderType)
{
  if (!IsTimeInRange(time_from_h, time_to_h))
  {
    Print("Trading not allowed outside of specific time span");
    return false;
  }
  
  MqlRates rates[];
  ArraySetAsSeries(rates, true);
  if (CopyRates(_Symbol, TimeFrame, 1, 3, rates) == -1)
  {
    Print("Error copying rates: ", GetLastError());
    return false;
  }
  // Check for bullish Inside Bar pattern
  if (rates[0].high < rates[1].high && rates[0].low > rates[1].low && rates[1].close > rates[1].open)
  {
    orderType = ORDER_TYPE_BUY;
    return true;
  }
  // Check for bearish Inside Bar pattern
  else if (rates[0].high < rates[1].high && rates[0].low > rates[1].low && rates[1].close < rates[1].open)
  {
    orderType = ORDER_TYPE_SELL;
    return true;
  }
  return false;
}

Quote
Disliked
This entry condition checks for an Inside Bar pattern. If the Inside Bar pattern is bullish (current bar's close is higher than its open), the expert advisor will enter a long position (buy). If the Inside Bar pattern is bearish (current bar's close is lower than its open), the expert advisor will enter a short position (sell).

And you can force AI to be more creative for example I asked this:

Quote
Disliked
Prepare something compleatly out of the box which is not known from theory and not found in internet - be creative

AI responded:

Quote
Disliked
I present to you a creative and unique entry logic based on the "Curved Bar" pattern. This pattern considers a combination of three consecutive bars that form a curve-like structure. The pattern is formed when the middle bar is either higher or lower than both the previous and next bar, and the price difference between the first and the third bar is minimal.

Inserted Code
// Curvature threshold to be adjusted for optimization
input double CurvatureThreshold = 0.01;
// EntryConditionMet
bool EntryConditionMet(ENUM_ORDER_TYPE &orderType)
{
  if (!IsTimeInRange(time_from_h, time_to_h))
  {
    Print("Trading not allowed outside of specific time span");
    return false;
  }
  
  MqlRates rates[];
  ArraySetAsSeries(rates, true);
  if (CopyRates(_Symbol, TimeFrame, 1, 4, rates) == -1)
  {
    Print("Error copying rates: ", GetLastError());
    return false;
  }
  double priceDifference = MathAbs(rates[0].close - rates[3].close);
  double middleBarRange = rates[2].high - rates[2].low;
  // Check for bullish Curved Bar pattern
  if (rates[2].low < rates[1].low && rates[2].low < rates[3].low &&
      priceDifference <= middleBarRange * CurvatureThreshold &&
      rates[0].close > rates[0].open)
  {
    orderType = ORDER_TYPE_BUY;
    return true;
  }
  // Check for bearish Curved Bar pattern
  else if (rates[2].high > rates[1].high && rates[2].high > rates[3].high &&
           priceDifference <= middleBarRange * CurvatureThreshold &&
           rates[0].close < rates[0].open)
  {
    orderType = ORDER_TYPE_SELL;
    return true;
  }
  return false;
}

Quote
Disliked
The entry condition checks for a "Curved Bar" pattern. If the pattern is bullish (middle bar has the lowest low and the price difference between the first and the third bar is minimal), the expert advisor will enter a long position (buy). If the pattern is bearish (middle bar has the highest high and the price difference between the first and the third bar is minimal), the expert advisor will enter a short position (sell).

It seems no more coding skill at all neded - everyone can make working expert advisors with GPT-4 version. Make proper optimizations and forwardtests and prepare portfolios of various EAs setups for various symbols - diversify. Because patterns profitability fluctuate over time. Can't rely on 1 particular pattern.
 
2
  • Post #136
  • Quote
  • Edited 4:25pm Apr 4, 2023 3:56pm | Edited 4:25pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting joyny
Disliked
And you can force AI to be more creative
Ignored
Here results for EURUSD for AI proposed strategy "Curved Bar":

Attached Image (click to enlarge)
Click to Enlarge

Name: ai_idea.png
Size: 19 KB


Here AUDUSD:

Attached Image (click to enlarge)
Click to Enlarge

Name: ai_idea2.png
Size: 21 KB
 
 
  • Post #137
  • Quote
  • Apr 5, 2023 12:13pm Apr 5, 2023 12:13pm
  •  triphop
  • Joined Oct 2007 | Status: Member | 1,041 Posts
Quoting joyny
Disliked
{quote} Here results for EURUSD for AI proposed strategy "Curved Bar": {image} Here AUDUSD: {image}
Ignored
awesome work Joyny. The end is getting closer …
 
1
  • Post #138
  • Quote
  • Edited 3:15pm Apr 5, 2023 2:53pm | Edited 3:15pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Quoting joyny
Disliked
Here results for EURUSD for AI proposed strategy "Curved Bar"
Ignored
In the progress of preparing my portfolio of EAs with AI-generated unique entry logic "Curved Bar".

So far analyzed a bunch of symbols and here picked up good runners which performed well in backtests 2013 till 2020 and continued to make good profits in forwardtests from 2020 till now.

Here it is - with the help of Chat GPT-4:

Attached Image (click to enlarge)
Click to Enlarge

Name: curve_portf.png
Size: 37 KB


Here total of about 20 EAs running because some symbols were so awesome well-performing that included 2 different setups in the portfolio.

Here drawdowns analysis:

Attached Image (click to enlarge)
Click to Enlarge

Name: curve_dd.png
Size: 11 KB


Each individual pickup was winning and did not see forward test data. Therefore this is not overfitted.

Max DD of entire portfolio was 16% if trading with 200 usd account. Max days to sit in DD 45. Recovery Factor of entire portfolio so far 78..

For me, this seems quite a promising strategy. For example, when comparing to Notable Numbers which performs good too (see here audited stats for >6 months live trading now) then Notable had 10 years Recovery Factor 40 and possibly 3 months in DD. "Curved Bars" analysis suggests it might be 2x better than Notable.

Will put on live and if 3 months go ok then put on my free signals page.
 
2
  • Post #139
  • Quote
  • Apr 12, 2023 4:14am Apr 12, 2023 4:14am
  •  pizd0s
  • | Joined Dec 2021 | Status: Member | 149 Posts
Looking forward to see how it performs on live trading. I still think you need a niche market for such trading strategies, won't be competitive for forex. Anyway good luck bro!
 
1
  • Post #140
  • Quote
  • Apr 30, 2023 12:04pm Apr 30, 2023 12:04pm
  •  joyny
  • Joined Nov 2019 | Status: Member | 683 Posts
Asked Chat-GPT 3.5 question: what are popular forex patterns based on candles?

here answer:

Quote
Disliked
There are several popular forex patterns based on candles that traders often use to identify potential trading opportunities. Here are some of them:
Quote
Disliked
Doji: This is a candlestick pattern that indicates indecision in the market. It has a small body with upper and lower wicks of equal length, indicating that buyers and sellers are in a state of equilibrium.
Quote
Disliked
Hammer: A hammer is a bullish reversal pattern that has a long lower wick and a small body at the top of the candle. It suggests that sellers are losing control, and buyers are beginning to take over.
Quote
Disliked
Shooting star: A shooting star is a bearish reversal pattern that has a long upper wick and a small body at the bottom of the candle. It suggests that buyers are losing control, and sellers are beginning to take over.
Quote
Disliked
Engulfing pattern: This is a reversal pattern that occurs when a small candle is followed by a larger one that completely engulfs it. A bullish engulfing pattern occurs at the bottom of a downtrend, while a bearish engulfing pattern occurs at the top of an uptrend.
Quote
Disliked
Harami pattern: The harami pattern is a reversal pattern that consists of two candles. The first candle is large and the second is small, and the body of the second candle is completely inside the body of the first. A bullish harami occurs at the bottom of a downtrend, while a bearish harami occurs at the top of an uptrend.


then asked to generate an entry function according to this post for Harami pattern and added to EA piece of code from Notable Numbers strategy to determine the trend based on bars count when previous n bars high/low are above the current price (downtrend, enter for reversal BUY) or below the current price (uptrend, enter for reversal SELL).

In optimizations, I see plenty of good setups. Now preparing a portfolio for the Harami pattern. But can make similar portfolios for any of 5 patterns mentioned by AI because they all are for reversals.
 
 
  • Trading Discussion
  • /
  • AI talking
  • Reply to Thread
    • 1 3456Page 7 8
    • 1 56Page 7 8
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023