Hi Can’t figure out, how adviseLong() calculate price difference I run this code:
// Run the script in [Train] mode with asset EUR/USD selected function run() { StartDate = 20140601; // just one day EndDate = 20140602; BarPeriod = 60; // use 1-hour bars
With LifeTime = 1, our target is the return of next bar trade. Trading costs are set to zero, so in this case the return is equivalent to the price difference just one bar in the future, right? But after comparing price difference between reference bar and adviseLong() output – it’s not identical as supposed to be. (see attached compare table)
Last edited by madpower2000; 11/23/1619:35.
Re: How calculate price difference with adviseLong() in right way?
[Re: madpower2000]
#463258 11/23/1621:5311/23/1621:53
It looks to me like there is non-zero slippage in the trade results reported from adviseLong(), even though you've set Slippage to zero. The difference could also arise from the trade results being affected by the exchange rate between your account currency and the quote currency of the asset being used.
No, Kris, I can’t confirm your hypothesis about exchange rate influence. I change USD<->EUR in acounts.csv – result is the same. So, waiting for jcl replay.