Hello, my positions are calculated very carefully, but still get some rejected trades. The message bar shows "Trades not included due to insufficient simulated capital or selected PosSizer: 5".
But can I view the rejected trades so I can dig into the problems? And actually I use some statement like below in my PosSizer:
curPosition = curCash/(currentPos.EntryPrice) - 1
I only have 4 trades each day, and curCash is actually cash/4 for each day. I dont know why it is still rejected. So it will be helpful if I can view these rejected trades.
Size:
Color:
The best way is to simply perform a Raw Profit backtest. As long as RP sizing is sufficient to enter as least 1 share (or 1 contract), you'll see all the trades.
Also, keep in mind that the Round Lots Preferences may result in a rejected Position.
Size:
Color:
thanks, Cone.
But in raw profit mode, my PosSizer will not be usable anymore.
And in portfolio mode, even I assigned priority for each trade, I also get different simulation result each time. Is that strange?
Size:
Color:
QUOTE:
I also get different simulation result each time. Is that strange?
No, it's expected if you don't set Position.Priority. If you don't, the priorities are random.
See User Guide: Strategy Window > Backtesting Strategies > How Trades Are Chosen
Size:
Color:
QUOTE:
And in portfolio mode, even I assigned priority for each trade, I also get different simulation result each time. Is that strange?
As I said, I set Position.Priority for each trade. Any idea?
Size:
Color:
I might have an idea: the priority was set incorrectly. Can you show us a code snippet?
Size:
Color:
I think I need glasses.
Size:
Color:
Hi Eugene, I think you are right. Thank you!
Actually there are multiple places in my code to long/short stocks. But I forget to set priority in one of these places. Now it is fine. thanks!
one more question, do you know how to use DebugPrint in my PosSizer? I want to print something in the Message and Error box.
Size:
Color:
Answered in your new thread.
Size:
Color: