It is still hard to help you without exact steps on how to reproduce the issues on our machines. If you want the community to help you with coding issues, you need to help them reproduce the problem in two minutes :) Nobody will spend hours guessing what is wrong. We have our own problems to solve :)
Best regards,
Panagiotis
Ok, I'll try to be more exact:
I don't ‘think’ there's anything wrong with my code (although, happy to be corrected)- it seems to operate (in real-time), as expected.
My Question maybe should be: Does anyone else find that the Backtest doesn't seem to reflect anywhere near the Real-Time performance when testing a cBot that uses Pending Orders (i.e. Backtest performs amazingly, but in real-time shows poor results) and has anyone overcome this problem?
(Perhaps, a setting I need to change or an add-on I need to download, a certain library I should be using?)
So as @PanagiotisChar hinted in a previous post, how are you doing your back tests? What settings in the back testing mechanism do you use? Do you have any screen captures to show your back test results with your settings?
Like, you're not providing us with any details on how you are backtesting, what the parameter settings are, etc etc.
protected override void OnBar() { // Check if price is in a supply or demand zone foreach (var zone in supplyAndDemand.sList) { // Check if current bar's high price is greater than zone's high price // AND previous bar's high price was lower than zone's high price if (Bars.HighPrices.Last(1) > zone.high && Bars.HighPrices.Last(2) <= zone.high) { // Enter short trade as price entered a supply zone ExecuteMarketOrder(TradeType.Sell, Symbol, TradeVolume, Instance, null, null, null, "Supply Zone"); } }
foreach (var zone in supplyAndDemand.dList) { // Check if current bar's low price is lower than zone's low price // AND previous bar's low price was higher than zone's low price if (Bars.LowPrices.Last(1) < zone.low && Bars.LowPrices.Last(2) >= zone.low) { // Enter long trade as price entered a demand zone ExecuteMarketOrder(TradeType.Buy, Symbol, TradeVolume, Instance, null, null, null, "Demand Zone"); } } }
} }
Hello there - I actually took a look at this inside visual studio and noticed that the indicator Calculate() method isn't getting fired (when using the Robot - it's actually fine when using purely as an indicator).
I'm using cTrader v4.7.7 - could there be an issue here?? I tried creating a basic indicator from scratch inside cTrader and wiring it up to your Robot also and it also didn't fire the Calculate() override. I then went back to basics and created a vanilla custom indicator and robot and referenced the indicator from the new robot. same outcome - Calculate() doesn't get fired.
Can anyone else confirm the same outcome?? - oh and hello everyone, been lurking for a long-time due to my username getting blocked for no apparent reason!! However, big thanks to the cTrader community team, now unblocked and ready for, ermmm responding!! ;).
Happy to attach my vanilla code examples that illustrate the issue when using an indicator inside a robot script using v4.7.7.
anyway -cheers and hello from me.
Of course it's not being fired - you aren't calling the indicator in a way to force its values to be calculated. You do this directly by calling the Calculate method, or indirectly by calling methods such as “.LastValue" to get the last value of the indicator, “.Last(1)”, “.Last(2)” (to get the value 2 bars ago), etc etc.
One of the reasons i dont consider this plattform being suited for real trading.
This is really dangerous.
Dont like when plattforms are not made customizable.
Hi there,
You can hide the indicator titles in the Viewing Options
Best regards,
Panagiotis
The overall point of this thread is one can't trade nicely with the indicator tiles shown, because they get in the way that the user cannot “Grab” either the SL or TP lines when trading.
Even if on the chart if the eyeball is clicked or unclicked, a user simply cannot click and drag the SL/TP line. In this example below, the SL bar can't be grabbed and dragged unless someone moves the entire chart area down so graphically the SL and TP lines come down BELOW all the indicator tiles:
One when the chart is re positioned like so:
is one able to grab and move the SL/TP lines.
So in a nutshell, as of version cTrader v 4.8.30 Spotware still hasn't fixed this issue. All they should need to do is fix the indicator tiles shown so their Z-Axis value is lower than the SL/TP lines displayed.
Or as I suggested in my original post, INDENT the indicator tiles displayed so the SL/TP parts can be grabbed.
Could you pleasesend us some troubleshooting information the next time this happens? Please paste a link to this discussion inside the text box before you submit it.
Best regards,
Panagiotis
I couldn't. cTrader became unresponsive. I had to kill it via task manager and restart.
However, if you can confirm the information will still be there even after restarting, I can try sending the trouble-shooting information? (I don't want to waste Spotware's time if it'll be pointless since I had to restart)
Unfortunately it is a lot of work to create a comprehensive example. If I find some time later, I will.
Best regards,
Panagiotis
Okay, many thanks in advanced ! PanagiotisCharalampouslet me know when there are any example I can refer to, I will pay attention to any update of this link, have a great day ahead!
I keep track of every position I open internally using Dictionary objects:
You should post your issue in the correct section of the forum and share some more information e.g. screenshots so that the rest can understand what are you looking at
Can we get someone at Spotware to delete this (and other similar posts) from the Suggestions forum?
firemyst
19 Dec 2023, 05:35 ( Updated at: 19 Dec 2023, 06:44 )
Two options:
@firemyst