Support Board
Date/Time: Wed, 15 Jan 2025 17:36:00 +0000
Post From: BackTest an AutoTrade System -- Is BaseData Modified per the 4 Samplings per Bar??
[2017-07-07 02:17:16] |
Sierra Chart Engineering - Posts: 104368 |
With bar based back testing, the condition will be evaluted during open of next bar using OHLC price even with BHCS_BAR_HAS_CLOSED in my condition
Yes this is the case but the order will be filled at the opening price of that new bar. The code example you gave in post #5 we think is a reasonable way to accomplish what you want. In that case, you would not use BHCS_BAR_HAS_CLOSED. This is what we would recommend: if (sc.LastTradePrice==Close[sc.Index])
Result = sc.BuyEntry(NewOrder); But you should do the comparison using a formatted evaluate: sc.FormattedEvaluate() Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |