Turtle Trader
Author: StkLab
Creation Date: 9/30/2008 7:07 PM
profile picture

StkLab

#1
Need some HELP converting script "Turtle Original V3.1" in WL4 (see old site) to WL5. Can one of the programers in the community convert this code?
profile picture

ilian

#2
see:
CODE:
Please log in to see this code.
profile picture

StkLab

#3
Thanks a lot!
profile picture

Cone

#4
Although it's not a problem in this case, just a word of caution about creating trades after checking the Positions.Count. To remove all doubt about peeking, it would be better to write the block of if (ActivePositions.Count == N) statements using "else" or a switch statement.
CODE:
Please log in to see this code.
As I said, in this case it's not a problem due to the way the statements are ordered and the fact that the trading signals can only add another active Position.
profile picture

Eugene

#5
To whomever cares: there is a subtle logic error:
CODE:
Please log in to see this code.

This way, the LS/SS variables are always taking into account the last active position. The appropriate change was applied to this Strategy's page in our WL5 Wiki.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).