Questions and Discussion About Manual Entry Automation

Progster's MEA Package for TradeStation - Enter manually, exit automatically!
User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Re: Questions and Discussion About Manual Entry Automation

Postby progster » Thu Mar 27, 2008 12:14 am

Hi, and thanks for posting your question:

Sam7768 wrote:1) Assume that I have placed a manual "buy"
2) I want the stop to become active automatically linked to an indicator (say ATR or SAR).
3) How do I make that happen?

Whatever your exit strategy is, you simply have it applied to the chart ahead of time, enabled, with Automation ON.

By so doing, the exit strategy is effectively "waiting" for any automated entry to take place. Once an automated entry takes place, the exit strategy does it's thing, behaving normally.

The key point is that your manually signaled entry is (in fact) an automated entry. That's what MEA accomplishes for you - it let's you manually signal an automated entry.

So, there is no special linking that needs to take place between your entry strategy (the MEA listener strategy, supplied with the MEA package) and whatever exit strategy(s) you use.

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Re: Questions and Discussion About Manual Entry Automation

Postby progster » Thu Mar 27, 2008 12:34 am

Sam7768 wrote:I use two min chart. suppose i place an order to buy, does the buy happens..

1) on the current bar or
2) At the begining of next bar or
3) At the end of next bar?

The MEA listener strategy (like any normal strategy) runs on every bar closure.

If you have it applied to a tick chart, this will be on every tick.

So, if the Global Variable locations which signal a trade are so set, the order will be entered upon the next bar closure (which could be as soon as the next tick, if you are on a 1tick chart).

If you use '_Stops and Targets' or similar level-based exits, you can apply this directly to the same 1 tick chart.

If you apply the MEA listener strategy to a 2m chart, then the order would be issued at the next 2m bar closure.

This would sacrifice immediacy of entry, in favor of (presumably) 2m market-action-based exits.

Since the stock MEA is not written as an IOG (Intrabar Order Generation) strategy, you can't currently deploy it to enter next tick when applied on a higher-timeframe chart.

An IOG version would certainly be nice-to-have, as it would allow market-action-based exits on the timeframe of choice while still offering 1-tick resolution for entry. This is something that I could do as custom work, but it would be at a higher price-point than the existing MEA Package.

Sam7768
Posts: 3
Joined: Mon Mar 24, 2008 7:59 pm
Contact:

Re: Questions and Discussion About Manual Entry Automation

Postby Sam7768 » Thu Mar 27, 2008 11:49 am

Thanks for your reply Progster.

Essestially, if the order is placed at the end of second bar, which means the actual execution happens at the buginning of 3 rd bar. I guess that would be too late.

Thanks.

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

No Bar #3

Postby progster » Thu Mar 27, 2008 12:28 pm

Sam7768 wrote:if the order is placed at the end of second bar, which means the actual execution happens at the beginning of 3rd bar.

I don't think your quote is correct. If you choose to operate on some higher timeframe bar (e.g. a 2m bar, instead of tick bars), then what happens is this:

  1. You use the pop-up dialogs to set the signaling GVs at any time, during any bar (call that bar #1).
  2. At the close of bar #1, the MEA listener strategy reads the GVs and issues the order.
  3. The order is filled (in simulation, or in realtime) as soon as possible.
So, if a limit order, it would fill sometime during bar #2, assuming the limit price was reached.
If a market order, it would fill in simulation at the open of bar #2, or in realtime some fractional time after the open.

IOW, the order is placed at the end of bar #1, and filled at the beginning of, or during bar #2. Bar #3 never enters into it (unless you are waiting for the market to reach a limit or stop price).

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Easy Way to Think of MEA

Postby progster » Thu Mar 27, 2008 12:34 pm

Here is what I find to be the easiest way to think of it:

The MEA Package allows you to manually signal your desired order entry at the resolution of the chart upon which you apply it.

In this respect, it is exactly like any other non-IOG automated strategy - orders are issued upon bar closures.

The difference is that instead of having the entry signal algorithm programmed in advance for rigid generation per inflexible rule(s), the entry signal is determined flexibly by your own eye-brain analysis.

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Competing with the Computer at Bar Closure?

Postby progster » Thu Mar 27, 2008 1:05 pm

Perhaps you mean this:

  1. A bar closes (bar #1). Calculations are done, numbers printed, indicators drawn, alerts issued.
  2. The user responds to the above (sometime after the close of bar #1 and during the time of bar #2).
  3. Order issued at close of bar #2.
  4. Execution at beginning of or during bar #3 (one full bar after your initial triggers)
If so, then that's correct.

Your response as a human to events that are calculated upon a bar closure cannot take place during that same bar .

This is good to point out, because it is different than the normal (non-human-coupled) strategy automation wherein the strategy can do all of item #1 above and then on that very same bar closure issue orders.

For pure speed, one does not substitute a human for a computer (instead, the other way around!). If you know exactly the conditions upon which you want to enter, then having the computer calculate them and issue orders would be the way to go.

OTOH, if you want to consider many variables from your own discretionary viewpoint, and you do not want the computer to blindly follow the same rules in all cases, then MEA let's you make the entry decision any time and for any reason(s) that you like, with action on the very next bar closure.

If you are watching a bar form, and you decide and signal in time before the end of the bar, then your order will go out upon the closure of that bar (just as a computer-calculated order would). If you are watching the bar form, and the process of thinking about it and signaling it goes a bit slower than MHz speed, such that you don't get your signal placed until after the closure, then you "pay" a 1 bar delay for retaining your human flexibility.

Small timeframe bars = small delay. Larger timeframe bars = larger delay.
(With an IOG version, it would be possible to send the order on the next tick in all cases.)

Note though that using MEA, your decision points are not tied to the end of the bar. You can make your decisions at any point during the bar. It is only the order issuing that must await the end of the bar. This is unlike using the Order Bar, with which you can send an order to the brokerage at any point in time (but you get no automated exit with that).

Thanks for raising the question and giving me the opportunity to write about these details.

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

How I Use MEA

Postby progster » Thu Mar 27, 2008 1:13 pm

There are, of course, many ways to trade.

I'll note that my own use of MEA follows a simple paradigm:

  • Wait until I like what I see on the chart
  • Enter using MEA
  • Move on, letting the computer execute preset "_Stops and Targets"
With this particular paradigm, once I'm in the trade, I only care about winning or losing some $$ amount. The particulars of how the market moves to make it happen do not concern me.

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

MEA Compound Position with '_Stops & Targets'

Postby progster » Fri May 30, 2008 5:32 pm

A user asks:
"How will multiple entries undertaken with MEA interact with the stock TradeStation strategy '_Stops & Targets' wrt. exiting at the specified stop-loss amount?"

'_Stops & Targets' uses the TradeStation internal exit keyword SetStopLoss, resulting in this behavior:

1) With ShareOrPosition = 1, each leg of a compound position exits at the chosen stop loss amount.
If the legs were put on at different entry prices, they will have different exit prices.

2) With ShareOrPosition = 2, the entire position is exited when the combined current loss matches the set stop-loss amount. IOW, the stop-loss PRICE gets closer as your position size increases (because the extra contracts make the loss AMOUNT accumulate quicker).

Of course, alternate behavior, such as (for example) exiting all portions of a compound position at a single stop loss price which was determined at the time of the very first entry, can be programmed as a custom exit strategy wherein the built-in exit keywords (SetProfitTarget, SetStopLoss, SetBreakeven, SetDollarTrailing, SetPercentTrailing, SetExitOnClose) are replaced with custom logic as needed.

elsutt
Posts: 1
Joined: Wed Jun 04, 2008 4:13 pm
Contact:

Re: Questions and Discussion About Manual Entry Automation

Postby elsutt » Thu Jun 05, 2008 3:22 pm

Can MEA be used with the new TS Sim accounts? And, would you feel that the Sim trading fills represent what would occur in a real money account?

Thanks

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Re: Questions and Discussion About Manual Entry Automation

Postby progster » Thu Jun 05, 2008 6:51 pm

elsutt wrote:Can MEA be used with the new TS Sim accounts?
And, would you feel that the Sim trading fills represent what would occur in a real money account?
Thanks

Yes, MEA works fine with the TS Sim accounts.

With all TS backtesting and simulation you have to keep in mind that the realtime queue of orders is not modeled.

IOW, in TS, both backtesting and simulation will show you as filled if price simply touches a limit or stop order. No provision is made for either lack of liquidity at a price or fast market situations, both of which occur in the real world.


Return to “Manual Entry Automation”

Who is online

Users browsing this forum: No registered users and 1 guest