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)


Posted by Jgills on 04-22-12 05:57 PM:

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?


Posted by syswizard on 04-23-12 03:58 AM:

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"


Posted by Jgills on 04-23-12 04:11 AM:

can easylanguage do calculations such as x day back standard dev, correlations, etc.? im assuming it can


Posted by syswizard on 04-23-12 06:07 PM:


Quote from Jgills:

can easylanguage do calculations such as x day back standard dev, correlations, etc.? im assuming it can


Yep - out-of-the-box.
Both Tradestation and Multicharts support Easy Language....which was just renamed in MC to avoid copyright infringement.
I'm excellent at Excel/VBA, but I don't want to waste time creating a trading platform....that's a daunting task in any language. I once considered it, but now I'm definitely moving to Multicharts.

__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"


Posted by Crispy on 04-23-12 07:02 PM:

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.


Posted by syswizard on 04-24-12 01:30 AM:


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.


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.

__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"


Posted by Crispy on 04-24-12 02:29 PM:


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.



Great, I learned something new today! I never heard local/workstation stop terminology.

Yes, server side stops are simply no good for certain products. ES options def one of those...

Im not excel savvy outside of using third party add-ins and some light calculations that drive my model. So, how difficult is it to build the program that creates the local/workstation? And would you know what it should cost me(ballpark) to have someone to write it?


Posted by syswizard on 04-24-12 03:16 PM:

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"


Posted by Crispy on 04-24-12 03:23 PM:


Quote from syswizard:

I take it you are talking Interactive Broker's platform then ?



Open e cry.


Posted by syswizard on 04-24-12 10:20 PM:

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"


Posted by Crispy on 04-25-12 03:17 PM:


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.

]

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?


Posted by syswizard on 04-25-12 03:56 PM:


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?



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 ?

__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"


Posted by Crispy on 04-25-12 04:56 PM:


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 ?



Yeah , got it..best to just tick F it and watch closely instead. Oh well it was worth a shot at saving my eyeballs from extra screen time.

Thanks for all replies!


Posted by Rodney King on 04-25-12 05:05 PM:

If you're trying to manage an options book via stoploss orders, http://bit.ly/lwpXnD


Posted by Crispy on 04-25-12 05:11 PM:


Quote from Rodney King:

If you're trying to manage an options book via stoploss orders, http://bit.ly/lwpXnD



LOL...nice pic

No book though....I day trade ES options. Thats all I trade in fact. My stops are always mental, thus the entire exchange about simply automating a bid hitting function when it goes my stop price.

My eyes just need a rest...lol


Posted by syswizard on 04-27-12 02:03 PM:


Quote from Crispy:


No book though....I day trade ES options. Thats all I trade in fact.



How is this better than trading the futures ? Options tend to be less liquid and wider spreads, no ?

__________________
"Success in the markets runs counter to everything we have been taught...and if you want a friend on Wall Street, get a dog"


Posted by Crispy on 04-27-12 02:26 PM:


Quote from syswizard:

How is this better than trading the futures ? Options tend to be less liquid and wider spreads, no ?



Not better, just slower paced. .50 delta ATM allows me wiggle room for certain setups.

Spreads are only 1/2 a buck typically to pay up, and usually can get them mid point or better as long as they are not trending too strong.

I will take the underlying sometimes, usually pre-mkt as the spreads are wider then.


All times are GMT. The time now is 02:05 AM.

Copyright © 2012 Elite Trader.