I added the chandelier stop to a strategy and ran it. It compiles and runs ok, just doesn't make any trades now. If I take out the chandelier portion and install a simple stop it works fine again. Any idea what is going on? Is it ok to post the code right here?
Size:
Color:
Not enough information. Post the code (click the CODE button), and let us know what the symbol, scale, and sizing settings are.
Size:
Color:
Here is the code. I ran it on the Nasdaq 100. Scale is daily and position size is 2% of equity. I'm getting errors that say "Parameter name: Index Index was out of range. Must be non-negative and less than the size of the collection."
CODE:
Please log in to see this code.
Size:
Color:
Chandelier has absolutely nothing to do with this problem, just comment the lines out to see.
This is where the problem is:
CODE:
Please log in to see this code.
You're trying to access data [at bar-60] outside of the main loop. Correct it and the error goes away:
CODE:
Please log in to see this code.
Next problem is trying to mix the pieces of logic from a multi-position strategy with a code block that belongs to a single-position strategy:
CODE:
Please log in to see this code.
The corrected code follows:
CODE:
Please log in to see this code.
Size:
Color: