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
Importing code from the book "Trading systems that work
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
Re: Importing code from the book "Trading systems that
You must specify one of the five different order actions with your Buy order: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".
... 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;
ExitLong is not supported by TS 8 and MultiCharts. In this case, the error can be corrected by using the appropriate exit instruction, Sell: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
Sell("Long Loss") next bar at EntryPrice * (1 - (StopLoss * 0.01))stop;