OnTick() is a method of a robot, not of a plugin. Same for Bars property. Here is a starting point for handling tick events and accessing bars in a plug in
using System;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Plugins
{
[Plugin(AccessRights = AccessRights.None)]
public class Test : Plugin
{
Bars _bars;
Symbol _symbol;
protected override void OnStart()
{
// To learn more about cTrader Automate visit our Help Center:
// https://help.ctrader.com/ctrader-automate
_bars = MarketData.GetBars(TimeFrame.Minute);
_symbol = Symbols.GetSymbol("EURUSD");
_symbol.Tick += _symbol_Tick;
}
private void _symbol_Tick(SymbolTickEventArgs obj)
{
Print(_bars.ClosePrices.Last(1));
}
protected override void OnStop()
{
// Handle Plugin stop here
}
}
}
Have you solve the issue with maximum balance drawdown? it shouldn't be based on the initial deposit, but instead it should be the recent balance before a trade is opened.
This announcement is about cTrader Desktop. The issue you mention does not seem relevant to cTrader Desktop
Going to year 2025 but still not able to see PHEIKIN ASHI chart type in chart of c trader desktop platform while algo cloud already been release. Thank u.
I did not understand what you are trying to describe. Can you visualize this somehow so that we can understand which popup texts you are referring to?
Best regards,
Panagiotis
When you hover the mouse over a line of an indicator it highlight's the whole line as a wide light grey line, and shows a text near the mouse saying the name of the indicator, its parameters in brackets, and the current value at that point. I called that text ‘popup text’. The problem is the text seems to appear regardless of whether the line is ticked (to show normally) or not (only the text 'pops up', the line itself remain correctly hidden).
To reproduce, add any indicator to a chart, say an EMA that only has one line, set its parameters so its line is well away from the candlesticks or any other stuff on the chart, hover on the line, see the ‘popup text’ & ‘fat’ line. All correct so far. Then right click & untick the line, click ok to remove the control box, and hover where the line was - the text will show and a right click there will bring up the control box again, whereas the text should not show and right clicking there should just cause the normal right-click chart menu to show (the same as if you right-clicked on the chart in other free space). The hidden line seems to be contaminating the what-looks-like free areas of the chart. It's probably a one-line fix.
Mouse is hovering over where the Middle line would show if it were ticked - it is unticked so correctly doesn't show, but also should not produce text when hovered over.
Hi there,
Thank you, it has been forwarded to the product team for consideration.
The backtesting function should be at the same place as on the cTrader Windows application. Just click on the instance and you should get the tab on the right.
Best regards,
Panagiotis
Danke für die schnelle Antwort.
Leider kann ich die Funktion nicht finden. Sie wird mir nicht angezeigt.
Übersehe ich sie vielleicht? Gibt es einen Screenshot?
Vielen Dank
I don't have a Mac, can you share a screenshot of what you are looking at?
If you want to recreate your cTrader ID, you would first need to delete it. You can use the link below to delete your cTrader ID. Note that in order to delete your cTrader ID, all your accounts need to be deleted first.
PanagiotisCharalampous
02 Dec 2024, 07:43
Hi there,
OnTick() is a method of a robot, not of a plugin. Same for Bars property. Here is a starting point for handling tick events and accessing bars in a plug in
Best regards,
Panagiotis
@PanagiotisCharalampous