| | Modified Super Express Extended Hours Entry Screen
Thanks PAE for referring me to your extended hours entry screen and giving me some suggestions for modifying the HTML code.
Below are some ideas for modifying either PAE's or the original Supper Express entry screen. The modifications are made on the file: se_order.htm
If you want fewer or more order lines on the screen, you can do a search for CreateOrderForms. When you come to CreateOrderForms(#) - where # is the number of current lines - you can simply change that to whatever number you want.
As you know, Datek will only allow Limit orders after hours. So, if you try to enter a market order with Duration set to "Day + Ext. Hours" - even during the day - Datek will send you an error message. I've been using Tai Jin's excellent Express Trader. He has many things automated, and has set up his form so that if you enter a Market order, it will automatically change the order type to "Day". I have set up Super Express with the same feature. This way, if you switch from Limit to Market and forget to change the Duration, your order will not be rejected.
As the form is set up now, if you switch from a Limit to a Market order without deleting the price, you get an error message. Often, when I need to get out fast, I switch to a Market order. The last thing I need at that moment is an error message.
On the other hand, on more than one occasion I have forgotten that I switched from Limit to Market, entered a limit price and was executed below where I wanted to be.
The best solution I was able to come up with was to let the error message come up, but have the program automatically reset the price to Blank. If I'm trying to enter a Limit order, I usually have time to re-enter the price, and if I was entering a market order, I can now execute it immediately after exiting the error message - without the added hassle of selecting and deleting the price. This particular change may not be of much use to most people, but when I'm in a hurry to get out, every step saved helps.
Below is the code for making these changes. I have put it in the "Sanity checks" section. Please note this caveat: I am new to writing HTML code. I tested the form with these changes over the weekend. Both the form changes and the messages I got back from Datek were what I expected. However, I cannot vouch for these changes. I'm going to use the revised form this week. If I run into any problems, I will post this.
Finally, I want to thank jmedved and Ephraim F. Moya for also responding to my request for an extended hours screen.
------------------------------------------------------
// Sanity checks <snip> // Resets the price so a market order can be put in immediately.
if (e['ordtype'].options[0].selected && Trim(e['price'].value) != '') { alert('I\'m confused: you selected "Market", but entered a price!'); e['price'].value = ''; e['price'].focus(); return; }
// If Market is selected, change "Day + Ext. Hours" to "Day". if (e['ordtype'].options[0].selected && e['expire'].options[1].selected) { e['expire'].options[0].selected = true; } |
|