Topics
Replies
JINGXUAN
15 Sep 2023, 05:05
RE: Backtesting Bug? (Spread)
JINGXUAN said:
see this, 1st photo is the backtesting provided deal map
2nd photo is the realtime deal map
Stop loss in the same level but the spread pips are not included in the backtesting system
I have found the source of causing this problem, when we are backtesting we should use the “Tick data from Server”, this will simulate the real time environment including all the spreads and commission

@JINGXUAN
JINGXUAN
08 Sep 2023, 06:26
RE: Creating Standard Deviation with SMA as source in cBot Robot
PanagiotisChar said:
Here you go
var sma = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);
var sd = Indicators.StandardDeviation(sma.Result,50, MovingAverageType.Simple);
Thanks Panagiotis, I found another problem while creating multiple SMAs and trying to use it as source in standard deviation it’s not possible to add up these SMAs, it says operator ‘+’ cannot be applied to operands of type ’SimpleMoving Average’ and ’SimpleMoving Average’, can you help me with the problem?
eg:
var sma1 = Indicators.SimpleMovingAverage(Bars.ClosePrices, 50);
var sma2 = Indicators.SimpleMovingAverage(Bars.ClosePrices, 100);
var sma3 = Indicators.SimpleMovingAverage(Bars.ClosePrices, 150);
var sma4 = Indicators.SimpleMovingAverage(Bars.ClosePrices, 200);
var sma_1234 = (((sma1+sma2)/2) + ((sma3+sma4)/2))/2
var sd = Indicators.StandardDeviation(sma_1234.Result,50, MovingAverageType.Simple);
@JINGXUAN
JINGXUAN
07 Sep 2023, 00:00
RE: Problmes with referring custom indicator's to cBot causing none executed trade in Backtesting
PanagiotisChar said:
Hi there,
Check your log and you will see an exception. You do not initialize BotPositions anywhere
Need help? Join us on Telegram
Thanks Panagiotis
@JINGXUAN
JINGXUAN
18 Sep 2023, 09:43
RE: how should I shift the value of Donchian's Low
PanagiotisChar said:
Thank you so much!
@JINGXUAN