Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm currently trying to write my first automated order handling system. This appeared to be a little more difficult because of the limitations of testing it. Thus, I hope I could get some feedback from some of the more experienced PL/EL-programmers here on futures.io (formerly BMT).
Code is intented to be used by the Portfolio Trader. My thoughts for the code is the following:
- If a buy signal is generated: Determine order size(in cash) by checking the current cash liquidity on the account. Don't place any orders if there are Open Positions already.
- Determine order size(in shares) by taking my order size(in cash) and dividing by bid/ask.
- Place a buy order between 10 and 11. First, place a bid order and a SL to this. If the order doesn't go through and the clock passes 11, take the current asked price (market order).
- Place a sell order three days after the buy order came through between 10 and 11. First, place a ask order. If the order doesn't go through and the clock passes 11, take the current bid price (market order).
- If the spread is 7 % or higher, then don't place any market orders.
Note: Data1 is minute-to-minute and Data2 is day-to-day resolution.
The Code:
This is my first automated order system and feedback is very welcome
All the best,
TahuPhoenix
Can you help answer these questions from other members on NexusFi?