
Topics
Replies
PanagiotisCharalampous
10 May 2019, 10:13
Hi Pierre,
Any chance we can get the cBot and exact steps to reproduce? If you do not want to share the cBot code, you can send it at community@spotware.com.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 May 2019, 10:11
Hi Alexander,
You can consider Timer which allows you to execute actions on a specific interval.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 May 2019, 10:06
( Updated at: 23 Jan 2024, 13:16 )
Hi camsphone111,
[Here ]it is.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 May 2019, 15:16
Hi Ton,
I am not disputing that these results seem unreasonable. However a screenshot doesn't help much, it's like searching for a needle in a haystack. If we come across it, we will check it.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
09 May 2019, 14:46
Hi Ton,
If you cannot share with us a cBot that reproduces such a result then it is not easy for us to explain the behavior and determine if there is a bug to fix.
Best Regards,
Panagiots
@PanagiotisCharalampous
PanagiotisCharalampous
09 May 2019, 09:25
Hi pierrecrot,
Thanks for posting in our forum. You can use the IsRising() function. See below
if(macd.MACD.IsRising()) { //Execute Order }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 17:57
Hi martin.spoon,
Can we arrange a TeamViewer session with you as well?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 17:08
Hi,
At the moment the formula to retrieve previous bars is the following
Backtesting start date - 100 * minutes in timeframe - 3 days
If your indicator needs more data than that, then you will have this issue. However we are looking into changing this behavior in the future.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 15:30
Hi ryan.a.blake,
The indicator code does not seemd complete. Can you please share the full indicator cBot and any code you might have written till now?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 15:13
Hi jitenlodhia,
Unfortunately we did not receive anything. If you can still reproduce the issue please contact us at community@spotware.com to arrange a teamviewer session.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 11:01
Try running the backesting in Visual Mode. It might help you understand it better.
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 10:53
Hi FireMyst,
-536 represents the difference between the equity at the moment the cBot stops execution (05/05/2019) and the starting balance (you still have an open position with unrealized P&L). The highlighted values show the balance and equity on the 26/04/2019.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 09:58
Hi FireMyst,
I had a look at the cBot. Please note that the chart does not show the equity at the moment that the backtesting finishes but the max equity reached since the moment the last position was closed (in this case 07/03). In other words, it says that since the 07/03 till the 20/04, the max equity reached 10400. The balance shows correclty and the ending equity is calculated based on the unrealized P&L of the remaining open positions.
Let me know if this clarifies things.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 09:43
Hi lec0456,
You already do it. There isn't a safe way to achieve this since the server can close the postion at any time and the information might need some time to propagate to you. During this gap, your code might have already passed the check and trying to close the position.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 May 2019, 09:32
Hi ryan.a.blake,
Can you explain to us what help do you need here?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 May 2019, 17:45
Hi nelson.pmf.sc,
Thanks for posting in our forum. See below
protected override void OnBar() { if (Positions.Count < 20) { var dailySeries = MarketData.GetSeries(TimeFrame.Daily); _MACD = Indicators.MacdCrossOver(dailySeries.Close, LongCycle, ShortCycle, MACDPeriod); if (_MACD.MACD.Last(1) < _MACD.Signal.Last(1) && _MACD.MACD.Last(0) > _MACD.Signal.Last(0) && _MACD.Signal.Last(0) < 0) { ExecuteMarketOrder(TradeType.Buy, Symbol, volume, "EUR/USD C", StopLoss, TakeProfit, 5); } if (_MACD.MACD.Last(1) > _MACD.Signal.Last(1) && _MACD.MACD.Last(0) < _MACD.Signal.Last(0) && _MACD.Signal.Last(0) > 0) { ExecuteMarketOrder(TradeType.Sell, Symbol, volume, "EUR/USD C", StopLoss, TakeProfit, 5); } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 May 2019, 17:42
Hi Patrick,
There is no single line solution for this. In general, you should keep track of the orders sent and the responses received. If e.g. you have a max number of 50, 48 positions open and 2 orders in progress, for which a response has not beed received, them probably you will have 50 positions soon. In this case, you should not open any further positions. You could have a global counter for the orders in progress (static variable?) which will be increased just before sending the order and decreased after a TradeResult is received.
Let me know if the above helps
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
07 May 2019, 16:53
Hi nedjadala,
Can you please provide more information to reproduce the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
10 May 2019, 10:49
Hi Alexander,
What chart events are you looking for? You can find all available chart events here.
Best Regards,
Panagiotis
@PanagiotisCharalampous