MethodNotFound Exception - Chart.TakeChartshot()
MethodNotFound Exception - Chart.TakeChartshot()
15 Apr 2023, 05:46
Hi Automaters,
I'm looking to add the ability to take a chart shot programmatically from an indicator I'm building. The section of code looks as follows:
if (Chart.IsActive)
{
var chartShot = Chart.TakeChartshot();
File.WriteAllBytes(@"D:\Documents\cTrader\Chartshots\chartshot_tmp.png", chartShot);
}
When this is executed, I get the following exception:
MissingMethodException: Method not found: 'Byte[] cAlgo.API.Chart.TakeChartshot()'
The method is found and suggested when writing that line of code and the indicator compiles fine. The chart is active, as required by the method.
I have tested this same code in a cTrader robot, however the method TakeChartshot() is not recognised at all (unlike in the indicator version).
Has anyone else come across this issue or know of any work arounds?
Thanks in advance.
Replies
Jexodus
16 Apr 2023, 11:59
RE:
PanagiotisChar said:
Hi there,
This method is only available in v4.7.7. Make sure you are using the correct version.
Need help? Join us on Telegram
Need premium support? Trade with us
I knew it would be something simple. I was using my brokers version which has yet to be updated to 4.7.7. Works perfectly now. Thanks mate.
@Jexodus
PanagiotisChar
15 Apr 2023, 12:18
Hi there,
This method is only available in v4.7.7. Make sure you are using the correct version.
Aieden Technologies
Need help? Join us on Telegram
Need premium support? Trade with us
@PanagiotisChar