
Forums (http://www.elitetrader.com/vb/index.php)
- Automated Trading (http://www.elitetrader.com/vb/forumdisplay.php?forumid=48)
-- dynamic exit in excel (http://www.elitetrader.com/vb/showthread.php?threadid=241213)
dynamic exit in excel
I am using excel/VBA and i am not yet familiar with c/c++, or other programming languages
If you think this is the type of problem that is more easily solved in another language, please say so and i'll take this as my time to start learning something else. if you can also point out a good reference to begin learning i would appreciate it.
i'm trying to program my spreadsheet to do the following:
if a trade is on, look at the P&L as it moves through time, if the loss is x or below or z # intervals have passed, close the trade.
If the gain is y or above, set a stop at y*some threshhold and if it continues higher keep moving the stop until it is hit.
any ideas?
Simple stuff in Easy Language....which is specific to trading. VBA/Excel is not. You've got a lot of functionality to build before you can do this.
You need functions for determining your position, your time-in-trade, and then a trailing stop function for those positions in the money.
Good luck !
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
can easylanguage do calculations such as x day back standard dev, correlations, etc.? im assuming it can
Quote from Jgills:
can easylanguage do calculations such as x day back standard dev, correlations, etc.? im assuming it can
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
Dont mean to thread jack, but I have excel exit question also.
I trade ES options with open e-cry. They dont accept stops, and that wouldnt work anyway as price can be points away from my the actual stop level before it actually prints....
So...is there a way to build functionality that says "if price goes bid X, sell at mkt". If so who can do it and what would it cost me? Ideally I want to just have a cell that I can put my stop in and be done with it instead of watching ticks all day.
Quote from Crispy:
I trade ES options with open e-cry. They dont accept stops, and that wouldnt work anyway as price can be points away from my the actual stop level before it actually prints....
So...is there a way to build functionality that says "if price goes bid X, sell at mkt". If so who can do it and what would it cost me? Ideally I want to just have a cell that I can put my stop in and be done with it instead of watching ticks all day.
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
Quote from syswizard:
That's called a "local" or "workstation" stop. Other stops are "server-side" (broker) or Exchange stop. As you are aware, BUY stops are always above the market, otherwise they convert to a market order...and vice-versa for SELL stops. So it's important that the software detects this condition and warns you before placing the stop order. Many platforms don't do this...which is an oversight IMHO.
I got "burnt" so many times by making that mistake.
The good news about "local" stops: no fees or delays for Cancelling and Replacing that order (CAR).
Bad news: not as fast or as efficient as server-side or exchange stop orders.
I take it you are talking Interactive Broker's platform then ?
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
Quote from syswizard:
I take it you are talking Interactive Broker's platform then ?
I've got the OEC Excel docs....you are aware they do support STOP orders ?:
Here's an example of a stop limit:
=TEST1|send!’Buy_10_ESU7_StopLimit_1550_1600’_
This likely goes to the OEC Servers.
The other technique is to track the price locally and place a market order when your stop price is hit.
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
]
Quote from syswizard:
I've got the OEC Excel docs....you are aware they do support STOP orders ?:
Here's an example of a stop limit:
=TEST1|send!’Buy_10_ESU7_StopLimit_1550_1600’_
This likely goes to the OEC Servers.
The other technique is to track the price locally and place a market order when your stop price is hit.
Quote from Crispy:
]
No, I was not aware. Nevertheless if you know how these trade, I would be 15 sell stop on some calls...she goes 15x15.5...then next actual print is 14 on a downswing. Stops are pretty much useless based on last sale.
Do you think the same excel link to OEC be used to track the price locally and shoot an order when my stop price becomes the bid?
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
Quote from syswizard:
Definitely doable. However, you are aware that locally, there is no stoplimit. If last print is 15.50 and you are sell stop 15, if it goes quickly to 13, that's your fill price.
Expect a lot of "slippage" like this. Whereas with Server or Exchange stops, you might be filled earlier like at 14 all depending on your position in the queue at that price level.
Got it ?
If you're trying to manage an options book via stoploss orders, http://bit.ly/lwpXnD
Quote from Rodney King:
If you're trying to manage an options book via stoploss orders, http://bit.ly/lwpXnD
Quote from Crispy:
No book though....I day trade ES options. Thats all I trade in fact.
__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"
Quote from syswizard:
How is this better than trading the futures ? Options tend to be less liquid and wider spreads, no ?
All times are GMT. The time now is 02:05 AM.