This topic is for questions and comments about the Manual Entry Automation package.User's helping users, CodeForTraders helping users, it's all good!Please stay on-topic, use an informative and accurate subject line, and respect the editorial policies of this Forum. Thanks!

MEA is presented as a live trading tool, which is great, but what I’m looking for now is the ability to backtest my historical entries. Will this package allow me to do that?

My answer (as of 12/19/2007):

The current version of the MEA Package is indeed designed for live trading. Visualization of historical manually-entered trades (i.e. after you have shut down TS and reopened it) is not part of today's basic MEA package.

However, I do have technology for applying to a chart a set of historical entries (such as you might have previously arranged to have written to a log file by MEA itself, or by other means). This specific technology has not been formally "productized" yet.

and puts the trades on the chart. You are then able to observe these "logfile" trades in a Performance Report and on the chart itself. In fact, if you have a list of your brokerage trades from the broker you used before TS, you can put them in the format above and use TS to run the performance analysis even on your pre-TS trades!

The trader then replied:

An improvement would be to include a field for entry names, too (e.g. "Crossover" or "LE4") so it would be easier to identify on the chart.

I agree, of course, that that such labelling of historical trades would be desirable. However, TradeStation does not support this in the way one would wish.

When you say, for example:

Buy ("XO4") next bar at market;

and see "XO4" on the chart with the order, that is based on the string literal "XO4" being present in the actual line of code that you see above. "XO4" is hard-coded, and you cannot use a variable in it's place.

Hence, loading in entry names from a file cannot be made to work in the way one might wish/expect. It's a relatively minor limitation, but certainly we can hope that it will be removed in the future.

Updates the Symbol and Shares fields according to certain global variables in the TS environment. Typically, the indicator ‘GV_SetFocus’ is in charge of writing the values into the TS globals. The user should manually cause ‘GV_SetFocus’ to run in the TS environment when they navigate from workspace to workspace. Refresh brings into the dialog whatever the last settings were as made in the TS environment.

Kill

Cancels pending limit and stop orders. Until a signaled limit or stop order is filled, the Listener strategy must renew that order on every bar. Clicking the Kill button signals the Listener strategy to stop performing such renewals, thus “killing” the pending order.

The Listener strategy is meant to be applied to a 1 tick chart. This assures the fastest possible action after you signal a desired order with one of the entry apps.

The Listener strategy, like all TradeStation strategies, gets executed at the close of every bar on the chart it is applied to. Hence, if you apply it to a 1 tick bar chart, you will execute the Listener on every tick of your symbol.

Note carefully: the Listener doesn’t execute until the symbol ticks. Thus YOUR ORDER IS NOT SENT IMMEDIATELY TO THE MARKET (as the Order Bar would send it), but is SENT UPON THE NEXT TICK.

So, the Listener is like any other normal (i.e. non-IntraBarOrderGeneration) automated strategy that you run – it only executes upon bar closures.

This is all normal and natural for a TradeStation strategy. It is just important that you understand that if your symbol isn’t ticking, your signaled order won’t get sent until it does.

So, as a matter of terminology, you are manually “signaling” an order, but not manually “placing:” an order.

These are separate mini-applications, invoked from TradeStation using Macros and HotKeys.

As can be seen, a chart will generally contain the MEA "listener" strategy (e.g. GV_Entry_02), and one or more exit strategies.

Because the listener and the exit strategies are running on the same chart, they have the same understanding of your market position and will interact appropriately.

___

It is possible for entry and exit strategies to be applied to different charts (in the case of futures) and operate together, but to do so requires custom coding for the strategies to be aware of each others actions. There is nothing to prevent you (or your programmer) from setting up any cross-chart interaction you can imagine, but you need to be aware that custom code is necessary to do it.

By enhancing the listener source code (which you get in the MEA package) you could write any state information you desire into global memory, and then you can code exit strategies which read that global memory to determine your current market position from any other chart you wish.

Or, you can keep it simple by having the listener and the exits run on the same chart. This simple approach works great for 'Stops & Targets' and similar profit/loss based exits in all cases. This is how MEA is designed to work immediately, "right out-of-the-box".

TradeStation automation is a complex subject. The best information is found throughout the TradeStation forums, and the community there can usually answer any well-formed question in short order.

Please be aware that I (Progster) cannot provide personal, free consultation on TS Automation in general. (I'm just too busy with trading, product development, and paying professional work to do so, sorry.)

I will, however, do my best to answer MEA-specific questions here in this area. Feel free to post your questions, or email them to: questions@CodeForTraders.com