The use case: the strategy opened a position, with a signal name (e.g. Open Long), then added to the position with a signal name (e.g., Add Long). So far so good. But when the strategy decided to exit the position, I used a single signal name parameter (Exit Long) to exit the entire position (ExitLongMIT(price, "EXIT LONG"), thinking the string parameter was "signal name". HOWEVER the string parameter is "fromEntrySignal", and since "EXIT LONG" was not an entry signal, the order was not placed, but nor was it logged (in either the Log tab or the log files).
After re-reading the documentation, I see that in order to use a Signal Name for an ExitLongMIT (or other Exits), you must first provide a "fromEntrySignal". But if the position comprises multiple entry orders, it appears two exit orders would have to be submitted in order to get a signal name on a chart. This seems bizarre, and could be avoided if the order of parameters were reversed (if only one string is provided, it is the signal name; if two strings are provided the second is the fromEntrySignal. This would arguably also better match the syntax of Openxxx orders which take a signal name parameter.
While I acknowledge changing the syntax may not be feasible (it would be an operation breaking action, though code would still execute), I think that if an order is ignored due to an invalid fromEntrySignal, then at minimum that should be logged somewhere.
Jack
Comment