when FutureMode is enabled, the strategy in limit orders sets OrderPrice = -21 474.84 despite the specified price in the code
Rename
Can you share the strategy code and backtest settings to reproduce what you may be seeing? To clarify explanations, send a screen shot by striking the "Print Screen" key and then pasting into Paint or other imaging application. Save as PNG and attach.
It looks like a fraction of the minimum value and Int32 can take i.e. -2,147,483,648.
QUOTE:
It looks like a fraction of the minimum value and Int32 can take i.e. -2,147,483,648.
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using WealthLab.Indicators; using System.Collections.Generic; namespace WealthScript2 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) { } public override void Execute(BarHistory bars, int idx) { if (!HasOpenPosition(bars, PositionType.Long)) { var t = PlaceTrade(bars, TransactionType.Buy, OrderType.Limit, bars.Close[idx] +10, "sample"); WriteToDebugLog(t.OrderPrice); } } } }
result:
settings:
symbol
debug:
Thanks. Hmm I made SPY part of the Moscow Stock Exchange market, defined it as Futures, turned on Futures mode etc., ran your code on SPY and still cannot reproduce. There must be something else to it we're overlooking.
By the way I notice your regional settings are Russian (comma is the delimiter). Tried this now and still no luck.
1. What's your position size?
2. Anything unusual on the chart of BTCUSD? (what data provider is this? you can find it out in the chart's status bar)
2. Anything unusual on the chart of BTCUSD? (what data provider is this? you can find it out in the chart's status bar)
i've checked other dataset and cant reproduce issue. So additional settings attached
Looks odd, we released B3 of Russia a week ago. How could the current build be "2" on your screenshot?? Unless you really saved that error report before May 13.
The debug log does not correspond with your sample code: it should produce exactly one line (and not 9+ as on your yesterday's screenshot):
---Symbol by Symbol Debug Logs---
---BTCUSD---
55706,83
Anyway, I cannot reproduce this with your settings using Finam's data.
The debug log does not correspond with your sample code: it should produce exactly one line (and not 9+ as on your yesterday's screenshot):
---Symbol by Symbol Debug Logs---
---BTCUSD---
55706,83
Anyway, I cannot reproduce this with your settings using Finam's data.
1. Just didn't restart for 5 days
2. The transaction does not occur due to the negative price, therefore, message repeated at every bar
2. The transaction does not occur due to the negative price, therefore, message repeated at every bar
Try to set your tick size to a reasonable positive number, currently you have a clearly bogus (negative) value there:
Thanks - really helped. Earned.
Your Response
Post
Edit Post
Login is required