Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 00:11:20 +0000



Post From: BackTest an AutoTrade System -- Is BaseData Modified per the 4 Samplings per Bar??

[2017-07-04 10:36:49]
Samuel - Posts: 8
Hi, I have the same query. If I only want bar-based back testing to execute at close price (ie, not open high or low), do I need to insert a condition in my code?

SCFloatArrayRef Last = sc.Close;

if (sc.LastTradePrice<=Last[sc.Index]+1 && sc.LastTradePrice>=Last[sc.Index]-1)
Result = sc.BuyEntry(NewOrder);

Thanks.
Date Time Of Last Edit: 2017-07-04 10:39:23