I'm trading a strategy in multiple accounts and want to automate order entry
These different accounts have different amounts of money in them
Right now, if I get n alerts, what I need to do is go into Tools->Preferences and change the account and click Apply
I then change the amount to trade in the Position size box and rerun the strategy
I then stage and place the trades.
I have a routine that reads an excel file that contains the tickers and the position sizes. It's easy enough to generate a set of alerts from that. Is there a way, within a script to specify an account? I didn't see it available in the documentation. If there is another way, please let me know.
Thanks
Size:
Color:
There is a better way. Select "Set Account" from the "Open Strategy" dialog:
Size:
Color:
Yes, that is one way, But I would need to close and re-open 3x (once for each account, no?) and then re-run the strategy on the dataset.
Size:
Color:
This preference is set once and remembered per each Strategy.
Size:
Color:
Ok, Can you confirm that I understand you correctly?
I should make 3 copies of the strategy, one for each account (and size), then run each of them, and stage/place orders from there
Thanks
Size:
Color:
That's correct. Just check the Account specified in Alerts to verify where the order will go.
Size:
Color:
Thanks Cone
I just tried it but it didn't seem to work.
I closed out of all my strategies
I then
1. Set account as Eugene specified above
2. Set the position size
3 Ran the strategy
4 Saved the strategy as Strategy_Account1
5. Closed the strategy
I repeated this 3x for each account yet when I reopened and ran again, each of those 3 strategies generated alerts for the last account I set, in the case, account number 3
Not sure why it didn't work
Size:
Color:
Works perfectly for me.
1. "Save as..." three times.
2. "Open strategy" > "Set account..." three times
3. Now, open the 3 strategies and find alerts in correct accounts:
Size:
Color:
It took this time. Not sure why but it did
One last question. I am trying to get one of the accounts to default to Margin instead of Cash.
Is there a way to do that? I didn't see how
Thanks again for the help
Size:
Color:
That should happen automatically for margin accounts. You should have to select Cash if you don't want the trade to be marked Margin.
To be clear, are there two choices, Cash and Margin, but it's defaulting to Cash?
Or, is Cash the only choice?
Size:
Color:
Hi Cone
It's giving me only cash as an option but it is a margin acct.
I forgot to manually change it in the staging process today and my trades have gone in as cash
Fidelity generally journals it over to margin a day or two later
Size:
Color:
sedelstein wrote in a
duplicate deleted thread:
QUOTE:
My strategy generates alerts which naturally show up in the alerts tab after the strategy has run.
The alerts tab generates orders which can then be placed or staged and is sized accordingly with appropriate number of shares given the fixed dollar amount originally input before the strategy was run
I am trading the strategy in multiple accounts. The account sizes are different so for example if I want to buy IBM, account X might want to buy $100,000, account Y will want to buy $50,000, and account Z will want to buy $25,000
Is there any way to achieve that objective by programming it? Right now, it requires 3 runs changing accounts and sizes each time. In addition, 1 of the account is a margin account and the other two are cash accounts.
Is there a way to use the alert object to do this (or really any way at all) It would help me save a lot of time entering orders.
Eugene answered:
What about assigning an account to a copy of the strategy, and saving the position sizing with a Strategy (Preferences > Save the following items...)?
sedelstein replied:
QUOTE:
I've done that. It requires 3 runs (through the same dataset for that strategy for each account). I am actively trading 4 different strategies. So 12 runs. More as I add strategies.
I have a file with the symbols, strategy, limit prices, shares for the given symbol and the account.
Is there a way to work with that?
Size:
Color:
You can save on manual runs by adding the strategies to a workspace. Other than that, I'm not aware of a programmatic way.
Size:
Color:
Hi sedelstein,
I too have three accounts that I would like to automate and trade based on an excel file of ticker symbols and position sizes. Would you mind sharing your routine that reads an excel file of tickers and position sizes? Can you explain how this is codified? i.e. Is this part of your codified strategy? Any other tips / suggestions on getting this to work would be appreciated.
Thank you,
Petrus3058
Size:
Color:
Size:
Color:
Thank you Eugene.
Size:
Color: