I ran across an very interesting situation with a script that I am writing. I had an an instance where I tripped both my long and short limits on the same day (CLGX on 10/25/2012). The problem was that my current code
CODE:
Please log in to see this code.
only exits one of the two positions. I have tried developing a simple modification that handles this highly unusual situation but have had no luck. Any suggestions? Thanks!
Vince
Size:
Color:
"if (IsLastPositionActive)" is meant for single-position systems only. You can not properly manage two or more positions using it. For a design pattern applicable to multiple positions, check out the WealthScript Programming Guide > Programming Trading Strategies > Multi-Position Strategies > MP Strategy Template.
Size:
Color: