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

Coding Entry and Exit Names



PureBytes Links

Trading Reference Links

Good Day All,

Here is a TS4 EasyLanguage question for anyone willing to take a crack
at it.

I have a system with a multiple number of entries and exits.  The exact
number of entries and exits is indeterminable ahead of time.  The goal
is to offset properly each matched pair of entry and exit.  E.g., the
general format is as follows:
Buy("Signal1") at market
ExitLong("Signal1") at givenprice

My original idea was to create and increment a counter each time the
conditions for a new entry signal were met, and then to perform a little
string arithmetic.  E.g.,
Buy("Signal"+NumToStr(counter,0)) at market
ExitLong("Signal"+NumToStr(counter,0)) at givenprice

Wrong!  TradeStation couldn't handle the syntax.  In fact, I discovered
that TradeStation can't handle any generic string variable within the
entry or exit signals.  It returned an error of "Buy or sell name within
double quotes expected here."

Am I missing an obvious solution?  Thanks in advance.

Good trading,
Galen Cawley