[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coding MFE exit signals



PureBytes Links

Trading Reference Links

Is there any way to use TradeStation to place an exit stop at the point at
which I have made $XXX.XX, using the provided Stops menu?  So that, once
that profit level is achieved, I will get stopped out of the trade at any
time in the future that my profit level falls back to that amount?  I am
basing this on John Sweeney's MFE, but there doesn't seem to be any way to
get TradeStation to do this automatically, and I'm having trouble coding it
correctly.

Here's an example:

I buy 2 lots of CLQ8 at 1500, and 5 more at 1510.  If the level at which I
would like to place the stop is $500 profit -- so, no matter what happens in
terms of run-up after I've made $500, I will be stopped out and therefore be
guaranteed to make at least $500 on the trade -- here's what happens.  It
gets complicated for the following reasons:

(Using the equation (($500/CurrentContracts)/BigPointValue) + EntryPrice))

With 2 lots on, my MFE price would be at 1525:
($500/2/10) + 1500 = 25 + 1500 = 1525

Then I add the 5 lots at 1510, and the MFE for those is 1520:
($500/5/10) + 1500 = 10 + 1510 = 1520

But for the whole position, it's roughly 1514:
($500/7/10) + 1507.1428 {average entry price} =  7.1428 + 1507.1428 =
1514.2856

Compare this to the average of the 2 individually-calculated MFEs, which is
1522.5, and you see my dilemma.  Which one do I use?  And, once I figure out
which one is the correct one to use, how do I get TradeStation to place a
stop at the correct price level?  And then erase this level after exiting
the position, whether at the MFE stop level or at some other point
designated by some other stop rule?  Of course, I'm no math scholar, and
clearly no EL whiz, and there are probably some big holes in my reasoning,
so please, someone help me out.  Thanks!

BJ