- ago
I am thinking of switching my strategy over to strategy monitor for closing positions based on streaming data so that I don't have to manually enter in all my sells.

The issue I foresee is that if I'm buying with the quotes window, then the strategy monitor may try to place duplicate trades. If I turn off the buys in the code, then it won't know the positions are open to be able to sell them.

So turning off buy orders only would be an easy solution. Is that possible?

If not maybe there's a way to do it with code that I can't think of or find? Any help is appreciated.

I'm trying really hard to find a way to make WL7 work for my swing trading.

Thanks.
0
410
9 Replies

Reply

Bookmark

Sort
Cone8
 ( 26.65% )
- ago
#1
No, there isn't (and won't be) a switch for that.

The solution would be to modify the strategy disable PlaceTrade for entries on the last bar. That way you won't get the Alert, but the hypothetical position will be there on the next bar for the exit logic to work with.

But why wouldn't you just use the S. Monitor OR the S. Window to place all the trades? Why is it necessary for you to break it up?
0
- ago
#2
I'll have to check that out.

I've never really used strategy monitor but I've been trying. When I tried it the other day it never made it through all the symbols. My strategy will often buy on the open with the first loading of the quotes. Strategy monitor with the 200 symbols doesn't seem to work fast enough. It may be because of the TD quote system but quote monitor triggered fine. It took 3 minutes to get the first complete run through on the strategy monitor.

Thanks
0
Glitch8
 ( 8.38% )
- ago
#3
It will take a long time to get the historical data, especially for TD. That's why the first run took so long. You can open the SM log pane for progress details. After that grueling process subsequent updates should be much faster.
0
- ago
#4
I'm sorry I can't find the setting you talked about above.

Can you please specify exactly what you mean by putting the setting to disable place trade on last bar?

Thanks
0
Glitch8
 ( 8.38% )
- ago
#5
It’s not a setting. Cone was suggesting that you could make such a change in your strategy code yourself.
0
- ago
#6
I see. I would love to do that if I knew how. May I please see an example?

How do you trick the code into thinking there is a position without placing the actual order?

Thanks
0
Glitch8
 ( 8.38% )
- ago
#7
CODE:
if (idx == bars.Count - 1) return;
0
- ago
#8
Hmm. Ok, I guess I'll play around with it more. Thank you
0
Glitch8
 ( 8.38% )
- ago
#9
Sure, adding that right after Execute will effectively prevent the Strategy from generating Signals.
0

Reply

Bookmark

Sort