You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think Enrique's idea of using a NN to classify the condition if it recognizes it or not sounds like it can be very useful/ profitable
Definitely interesting. I'm curious which condition this is, in practice.
___
NELODI: I realize that your function is nothing less but an extremely nested function (only limited by the number of "y") with (pseudo)random result of each of these subfunctions. So basically it's an attempt to get from pseudo-random one step closer to actual randomness.
This is a hard nut to crack, as producing irreproduceable results is propably the whole purpose of this function.
But no excuses, I wrote something, but it is to be expected that the training time takes very long ... I think I'll let it run overnight...
The basic code looks like this (#include files not shown here!):
I didn't find anything about .ex5 files in the forum rules and also wonder why we have the option to add such files if this is not wanted. If this should indeed be a problem, then I excuse myself and any moderators please feel free to delete it.
Chris70:
NELODI: I realize that your function is nothing less but an extremely nested function (only limited by the number of "y") with (pseudo)random result of each of these subfunctions.
Actually, the function is only one level deep, not extremely nested. And the number of iterations in the loop is fixed (it equals the "y" parameter). Anyway ... I've tested how long it takes the function to return a result (see my code below) and at least on my PC, the test code prints =>650, which is in microseconds and means that each call takes up to 0.7 microseconds on the average for parameters ranging from 0 to 1000 (since the loop makes 1000 calls).
Anyway ... I've downloaded your ex5 file and dropped it on to a new EURUSD chart, but I don't see anything. Is there something specific I should do to let it train on my PC and to see what you see?Actually, the function is only one level deep, not extremely nested. And the number of iterations in the loop is fixed (it equals the "y" parameter). Anyway ... I've tested how long it takes the function to return a result (see my code below) and at least on my PC, the test code prints =>650, which is in microseconds and means that each call takes up to 0.7 microseconds on the average for parameters ranging from 0 to 1000 (since the loop makes 1000 calls).
Yes, I understand why you don't consider it as a classic nested function (not a nested loop!), but the result of the rand() function of each iteration of the y loop (fixed or not) is taken into account for the result of the next iteration. So still, we somehow have y times a function inside a function, whereas of course not the last preliminary result of "r" goes into the next iteration, but the last rand(), which doesn't make it any easier. Any repeated call of rand() is like a nested function (again, not a nested loop). But I'm not a professional programmer; please correct me if I'm wrong.
Actually, the function is only one level deep, not extremely nested. And the number of iterations in the loop is fixed (it equals the "y" parameter). Anyway ... I've tested how long it takes the function to return a result (see my code below) and at least on my PC, the test code prints =>650, which is in microseconds and means that each call takes up to 0.7 microseconds on the average for parameters ranging from 0 to 1000 (since the loop makes 1000 calls).
Anyway ... I've downloaded your ex5 file and dropped it on to a new EURUSD chart, but I don't see anything. Is there something specific I should do to let it train on my PC and to see what you see?It's written as an EA, not script; it should work if you run it via strategy tester.
Yes, I understand why you don't consider it as a classic nested function (not a nested loop!), but the result of the rand() function of each iteration of the y loop (fixed or not) is taken into account for the result of the next iteration. So still, we somehow have y times a function inside a function, whereas of course not the last preliminary result of "r" goes into the next iteration, but the last rand(), which doesn't make it any easier. Any repeated call or rand() is like a nested function (again, not a nested loop). But I'm not a professional programmer; please correct me if I'm wrong.
The rand function (as a piece of code) is NOT nested, but it does have a state, which is updated after each call and affects the output of the next call. But the same is true for any function that uses a variable which is being updated at certain points of the calculation and contributes in any way to the final results.
Which is why this single function calls the final result of y repeated interdependent functions in a row. It's many functions inside one function. Instead of just rand(), which sets the seed for the next call, we're basically looking at something like rand(rand(rand(rand(...)))) --> edit: of course rand() is parameter-free; I'm just trying to indicate that we're handing over the state/seed to the next call.
I'm aware that the word nested is often used in a different way (for those who understand german I'd say "verschachtelt"; nested here is used for lack of a better english word coming to my mind), especially with loops, where it exponentially deteriorates performance. This is not the case here. Again, semantics... I guess we mean the same. My point wasn't about performance, but why this equation is so hard to solve that you might win this challenge if I don't have a year of training time ;-) especially with high values for y; let's say we set it to 1 million...
When I offered the challenge, I had some complicated combination of your sin/cos/log/exp... example in mind (as you suggested), not looped repetitions of functions - but I didn't say that, so I guess you already won ;-)
Which is why this single function calls the final result of y repeated interdependent functions in a row. It's many functions inside one function. Instead of just rand(), which sets the seed for the next call, we're basically looking at something like rand(rand(rand(rand(...)))). I'm aware that the word nested is often used in a different way, especially with loops, where it exponentially deteriorates performance. This is not the case here. Again, semantics... I guess we mean the same. My point wasn't about performance, but why this equation is so hard to solve that you might win this challenge if I don't have a year of training time ;-) especially with high values for y; let's say we set it to 1 million...
When I offered the challenge, I had some complicated combination of your sin/cos/log/exp... example in mind (as you suggested), not looped repetitions of functions - but I didn't say that, so I guess you already won ;-)
I deliberately chose a pseudo-random function, because I believe that the market behaves like a random walk.
Anyway ... I finally got your EA to run in my Strategy Tester and show me the results live. I am also going to leave it running over the night.
I deliberately chose a pseudo-random function, because I believe that the market is a random walk.
Anyway ... I finally got your EA to run in my Strategy Tester and show me the results live. I am also going to leave it running over the night.
You can also run it in the optimizer --> should be faster in non-visual mode; just set the "training counter" to e.g. 1-100 and optimize "slow and complete" with all but one threads disabled; the weight matrix will be saved to the common file folder and re-used upon the next training cycle. But be aware that if " every tick" is chosen, you get as many iterations per cycle as there are ticks, so then it's probably better to not chose "years" of training history. Shorter time per cycle means you get more preliminary reports (also in the common file folder).
By the way, it's gonna be interesting if different network architectures make a difference (if anything useful comes out of it at all within reasonable training time). I thought for such a complicated task to be reflected in a network, we probably need many weights, so I set the input parameters to 10 layers with 500 neurons each. Activations: all sigmoid. Learning rate 0.001 with time decay set to 0.0001 and "vanilla" stochastic gradient descent and dropout set to zero (cause overfitting isn't a risk here).the biggest interest of neural networks applied to trading is precisely to avoid optimization and reoptimization and rereoptimization
the biggest interest of neural networks applied to trading is precisely to avoid optimization and reoptimization and rereoptimization
This is was misunderstanding: I suggested the "optimizer" here only in order to abuse it for an automated program restart. It doesn't "optimize" anything. The training counter in this example does nothing but counting and is irrelevant for the network. Apart from this: this is here now a fun exercise for the sake of the challenge, it has nothing to do with trading and if the equation is solvable, then it does have an "optimal" solution. Despite not being realistically achievable with this hard nut, optimisation/good fitting is part of the quest.