Hello, I need to solve a task using Dataset optimization:
If there are more than 5 signals at the same time (on the same bar) or 5 opened positions at the same day, then the script must not open the positions on other tickers during the rest of that day.
I didn't find the solution in the basic functions of Wealth-Lab, so I began to think about the individual solution. I had an idea to write the opened positions to the file with the date when it opens and during the optimization check the file when the other tickers are optimized, but the optimization is not going continiously: "one ticker after another" - it goes "one day after another with all tickers in dataset" . And as I understand it is also using several threads, so I think the solution with a file will not work :(
Tell me please how I can limit the number of opened positions in the whole dataset during 1 day?
If there are more than 5 signals at the same time (on the same bar) or 5 opened positions at the same day, then the script must not open the positions on other tickers during the rest of that day.
I didn't find the solution in the basic functions of Wealth-Lab, so I began to think about the individual solution. I had an idea to write the opened positions to the file with the date when it opens and during the optimization check the file when the other tickers are optimized, but the optimization is not going continiously: "one ticker after another" - it goes "one day after another with all tickers in dataset" . And as I understand it is also using several threads, so I think the solution with a file will not work :(
Tell me please how I can limit the number of opened positions in the whole dataset during 1 day?
Rename
You'd add the necessary logic in Pre or PostExecute().
1. Daily or Intraday?
2. Market or Limit/Stop orders?
3. Block or C# Code?
Depending on the answers, it's also possible that the "Max Entries per Bar" PosSizer would do the trick for you.
1. Daily or Intraday?
2. Market or Limit/Stop orders?
3. Block or C# Code?
Depending on the answers, it's also possible that the "Max Entries per Bar" PosSizer would do the trick for you.
1. Intraday - M15 Timeframe (but there can be also several signals on the same bar)
2. Market orders
3. C# Code
2. Market orders
3. C# Code
How on Earth are you using Wealth-Lab? You're not a subscriber, there's no active demo I can find, you started asking your questions half a year ago.
Okay, I investigated into this and found that you're kind of posting as an alter ego of a WL8 subscriber. As this brings a lot of confusion, multiple accounts aren't allowed. Please use the subscriber's account to post your questions. Thanks.
Does this no-code solution work for you?

However, it won't stop your strategy from filling multiple trades each day while trading live. If you need that, then you'll have to go a step further with a code solution.
However, it won't stop your strategy from filling multiple trades each day while trading live. If you need that, then you'll have to go a step further with a code solution.
Your Response
Post
Edit Post
Login is required