ok, getting a strange series of errors that I suspect tie back to markets & symbols setup. But, need some assistance and direction to solve.
I am getting order rejections that I think tie to BPV and the increments that a specific symbol can be traded at with a limit order.
Here is the screenshot of both the log and and order manager inside of tradestation.
I am getting order rejections that I think tie to BPV and the increments that a specific symbol can be traded at with a limit order.
Here is the screenshot of both the log and and order manager inside of tradestation.
Rename
Thanks. We'll look into that.
To work around it right away, you can massage limit and stop prices in your script like this:
To work around it right away, you can massage limit and stop prices in your script like this:
CODE:Technically, depending on the TransactionType and OrderType, you would use "Floor" or "Ceiling" instead of Round, but this is the quick and dirty solution.
public override void Execute(BarHistory bars, int idx) { if (idx == bars.Count - 1) // last bar { // your limit (or stop) price double limit = bars.Close[idx] * 0.995; // round it to the tick size double tick = bars.SymbolInfo.TickSize; double newlimit = Math.Round(limit / tick) * tick; WriteToDebugLog($"tick: {tick}; limit was: {limit:N4}; is: {newlimit:N4}"); Transaction t = PlaceTrade(bars, TransactionType.Buy, OrderType.Limit, newlimit); } }
thoughts on a workaround for a block strategy?
You'd have to export it to C# Code (button at the top), edit it, and use that one.
We'll get it resolved in the next TS update.
We'll get it resolved in the next TS update.
awesome, set my expectations on timing if you can?
Lots for me to do, but I am a planner :)
Lots for me to do, but I am a planner :)
Your Response
Post
Edit Post
Login is required