A script to call two scripts one for opening position and another for exit?
Author: TrendCatcher
Creation Date: 2/18/2009 10:03 AM
profile picture

TrendCatcher

#1
Hi Eugene/cone/Dr.Koch:
Is it possible to write a script to call two scripts one for opening position and another for exit position. If yes, could you give me a simple script. I will use it accordingly.
profile picture

Eugene

#2
Technically it's possible to call a strategy from another V5 strategy, but I don't get the point for opening and closing a position by two different strategies. Could you elaborate?
profile picture

TrendCatcher

#3
Some scripts I see as good buy side and some are good at sell side also differ from bull ver bear moves. I would like to see if I can use this combo script and see how it works out. Thank you for your prompt response.
profile picture

Eugene

#4
Now this invoking a strategy from another looks like a request for multi-system for V5. Unfortunately, this sort of thing isn't developed yet.

And while theoretically possible, the technique of "calling a strategy from another" isn't ready for prime time for some reason. (If we find a workaround for our problem, we'll include a set of functions in Community.Components and announce it.)

For practical purpose, I'd suggest to combine the entry/exit logic blocks of these two strategies in one and use the Position.EntrySignal to differentiate between the "subsystems" when exiting a position.
profile picture

kfmfe04

#5
I was thinking about this, too.

Good suggestion (using Position.EntrySignal to detect the trigger), Eugene - just a quick question: can you show me a code snipplet on how you would, say send an order for a 1/2 size position, because only 1 of 2 systems has flagged a buy?

Thanks in advance.


profile picture

Eugene

#6
Frankly, until Fidelity implements SetShareSize or PosSizers (aka $imuscripts) I don't see a way to vary the size of position.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).