OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
Omni Pilot Discussion
Open Positions
Last Activity 4/26/2019 10:38 PM
5 replies, 5321 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
JamesR

Member
25
Posts: 33

Joined: 1/7/2011
Location: Cotswolds, UK

User Profile
 
Subject : Open Positions
Posted : 11/19/2013 10:01 AM
Post #22394

I have created an OP script that automates all of my daily OT activities via a dialogue - nothing too fancy but gets my EOD Data, runs OT, does analysis and emails me any new signals, exits etc.

The only thing I have not been able to successfully achieve is to get it to email me a list of Open Position per Portfolio (in fact I am struggling to get a list of open positions without regard to portfolio!!!).

Can anyone point me in the right direction of how to enumerate a list of the currently open positions (I know how to build up the email and send etc. it is just finding the correct procedures to find the open positions I am struggling with).

Many thanks

James
^ Top
JamesR

Member
25
Posts: 33

Joined: 1/7/2011
Location: Cotswolds, UK

User Profile
 
Subject : RE: Open Positions
Posted : 1/11/2014 9:04 AM
Post #22548 - In reply to #22394

Solved this now!!!!


^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Open Positions
Posted : 1/11/2014 9:12 AM
Post #22550 - In reply to #22548

Your solution to this useful task would be helpful to others, if you care to share :~)
^ Top
JamesR

Member
25
Posts: 33

Joined: 1/7/2011
Location: Cotswolds, UK

User Profile
 
Subject : RE: Open Positions
Posted : 1/11/2014 9:32 AM
Post #22551 - In reply to #22394

Jim

Will do - I will cut that section of code out from the rest of the script and make a standalone that just does this bit.

Add a few comments and attach.


^ Top
JamesR

Member
25
Posts: 33

Joined: 1/7/2011
Location: Cotswolds, UK

User Profile
 
Subject : RE: Open Positions
Posted : 1/12/2014 3:21 AM
Post #22555 - In reply to #22394

Attached is my solution. This allows me to get OT to send email reports of both open positions and open orders per account.

Note this uses a bit of a cheat - I could find no way of accessing the account names from within OT. So this script relies on the user manually setting up a directory somewhere on their PC and in that directory creating a set of files with names matching their OT Account names.

I just used Notepad to create a set of txt files with matching names.

This could be used to select which Accounts to report on (by missing out any you are not interested in).

If you can live with this limitation, then have a look at the script (or if you know a way of accessing the account names, maybe let me know!!!!)

Note that the script will try to send an email, but you need to fill in your email account details in the SendByEmail function and ensure you have put the email address you want to sent to in the almost last line of the SendPositionsandOrders function

Any questions - please shout - I have tried to put some sensible comments in the code to assist.


Attached file : SendPositionsandOrders.txt (6KB - 569 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Open Positions
Posted : 1/12/2014 4:42 AM
Post #22556 - In reply to #22555

Thanks James. Nice piece of work, there!
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.