Importing code from the book "Trading systems that work

Questions about MultiCharts and user contributed studies.
frenchfry
Posts: 8
Joined: 23 Dec 2006

Importing code from the book "Trading systems that work

Postby frenchfry » 27 Dec 2006

I'm trying to import all the TS code examples from the book "Trading systems that work" from Thomas Stridsman but somehow Multicharts doesn't seem to like them. If I compile the code I get errors.

Here is a code snippet:

If Condition1 = True Then
Buy ("Go long") at open;

Error message: "common error".

or another one with the same error message:

ExitLong ("Long Loss") at EntryPrice * (1 - (StopLoss * 0.01))stop;

I'm sure that there will be more issues once I fix the above. Can somebody please tell me how I need to change above code?

Thanks

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Re: Importing code from the book "Trading systems that

Postby Stanley Miller » 28 Dec 2006

I'm trying to import all the TS code examples from the book "Trading systems that work" from Thomas Stridsman but somehow Multicharts doesn't seem to like them. If I compile the code I get errors.

Here is a code snippet:

If Condition1 = True Then
Buy ("Go long") at open;

Error message: "common error".
You must specify one of the five different order actions with your Buy order:
... this bar on close;
... next bar at open;
... next bar at market;
... next bar at yourprice Stop;
... next bar at yourprice Limit;

In your sample you have to use Buy ("Go long") next bar at open;

or another one with the same error message:

ExitLong ("Long Loss") at EntryPrice * (1 - (StopLoss * 0.01))stop;

I'm sure that there will be more issues once I fix the above. Can somebody please tell me how I need to change above code?

Thanks
ExitLong is not supported by TS 8 and MultiCharts. In this case, the error can be corrected by using the appropriate exit instruction, Sell:

Sell("Long Loss") next bar at EntryPrice * (1 - (StopLoss * 0.01))stop;


Return to “MultiCharts”