- ago
I am using the Dummy Broker to test a strategy in SM. In SM settings I set Broker for Dummy Account 7. On entry signal it opened a position in DA 7. On exit signal it tried to exit the position from Dummy Account 5. Of course, it couldn't find the position, and reported a "Could not find a matching position to exit" error.

The only reason I can think of that it was looking in DA 5 for the position is that the Order Manager was set to DA 5. Does that have to be set to DA 7 to exit properly? Is the Broker setting being used for entries but not exits?

0
158
8 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.33% )
- ago
#1
No, the Account you set in the Order Manager has no bearing on the Strategy Monitor. It uses whatever Account you set up for the Strategy dropped into the SM.

As an example, I have my Order Manager set to Account 1, but my Strategy Monitor Strategy is configured to use Account 4. See how both the entry and the exit occurred on Account 4?

Is it possible a different Strategy triggered that exit, or that you maybe re-configured the Strategy?

0
Cone8
 ( 27.64% )
- ago
#2
The broker selected in the Order Manager is:
1. for Placing manual trades from the Order Manager, and,
2. used as a default broker (and/or Data Provider when applicable) when opening new tools... you should check this and the account for the tool you're using (S. Monitor, Quotes, etc.)
0
- ago
#3
QUOTE:
Is it possible a different Strategy triggered that exit, or that you maybe re-configured the Strategy?

No. It is the only strategy that has this underlying symbol in its dataset (actually single symbol). I don't believe the strategy was running anywhere else (SW or SC) at the time, but I will continue to monitor for reoccurrence.
0
- ago
#4


I see it's attempting to buy and sell on the same bar. That can't be right. Looking more closely, these signals are actually buy signals that are apparently triggering a sell. I have Cancellation Code set for "= 1" for both buy and sell. Could that be triggering the sell, particularly since it looks like the preceding sell signal is never being generated?

When I run this in the SW, it backtests normally and does not exhibit this behavior.
0
- ago
#5
But even if so, I don't know why it would pick DA 5.
0
- ago
#6
I may have found a coding error where I am testing for exit on nexrBarIsLastBar instead of nextBarIsLastBarOfDay. I'm fixing now and will report.
0
Glitch8
 ( 12.33% )
- ago
#7
Check your Strategy code that you're not setting the account anywhere. If you continue to have problems with this we can schedule a call so we can take a closer look. It's not happening in my runs.
0
- ago
#8
@Glitch @Cone
There were errors with my coding for the Buy signal. I won't bore you with the details.

I resurrected the original code that created the issue.

I confirmed with my testing that, whatever my errant code is doing to WL, WL is indeed using the dummy account set in the Order Broker to try to find the position to sell, independent of the account specified in strategy.

I emailed the strategy to you in case you want to investigate further.
0

Reply

Bookmark

Sort