Example Plugin error
Example Plugin error
22 May 2024, 11:22
Hi, Just starting to look at how to create a Plugin but the example plugin seems to have errors around the Trade Watch.AddTab statement on line 43.
The error messages generated by the compiler aren’t helping as much as they normally do so could you please let me know the correct syntax? The erroneous statement is this:
Trade Watch.AddTab(“Volume”).Child = _volumeText;
There is no other sample code to check against and the manual isn’t clear to me, sorry.
Any tips would be very welcome, many thanks.
Replies
ianmacphee58
22 May 2024, 12:11
( Updated at: 23 May 2024, 05:07 )
RE: Example Plugin error
PanagiotisCharalampous said:
Hi there,
Can you please clarify which example you are using?
Best regards,
Panagiotis
Hi, thanks for the quick reply.
I only saw one example, it’s shown in the manual under Plugin Placement / Creating an Example Plugin and it seems to be called PluginPlacementTest. Hope that helps.
Thanks again. 👍
@ianmacphee58
ianmacphee58
22 May 2024, 12:54
( Updated at: 23 May 2024, 05:07 )
RE: RE: Example Plugin error
ianmacphee58 said:
PanagiotisCharalampous said:
Hi there,
Can you please clarify which example you are using?
Best regards,
Panagiotis
Hi, thanks for the quick reply.
I only saw one example, it’s shown in the manual under Plugin Placement / Creating an Example Plugin and it seems to be called PluginPlacementTest. Hope that helps.
Thanks again. 👍
Hi, The Code Samples example also does not compile - see Plugins / Code Samples / Displaying Information About Bar Prices in the 'Trade Watch' Display.
The one I mentioned earlier is this:
https://help.ctrader.com/ctrader-algo/guides/plugin-placement/#creating-an-example-plugin
Okay I think I have solved it myself.
I replaced your sample code (doesn't compile):
Trade Watch.AddTab("Volume").Child = _volumeText;
with this (compiles and works):
var tab = TradeWatch.AddTab("Volume");
tab.Child = _volumeText;
@ianmacphee58
PanagiotisCharalampous
23 May 2024, 05:22
RE: RE: RE: Example Plugin error
ianmacphee58 said:
ianmacphee58 said:
PanagiotisCharalampous said:
Hi there,
Can you please clarify which example you are using?
Best regards,
Panagiotis
Hi, thanks for the quick reply.
I only saw one example, it’s shown in the manual under Plugin Placement / Creating an Example Plugin and it seems to be called PluginPlacementTest. Hope that helps.
Thanks again. 👍
Hi, The Code Samples example also does not compile - see Plugins / Code Samples / Displaying Information About Bar Prices in the 'Trade Watch' Display.
The one I mentioned earlier is this:
https://help.ctrader.com/ctrader-algo/guides/plugin-placement/#creating-an-example-plugin
Okay I think I have solved it myself.
I replaced your sample code (doesn't compile):
Trade Watch.AddTab("Volume").Child = _volumeText;
with this (compiles and works):
var tab = TradeWatch.AddTab("Volume");
tab.Child = _volumeText;
Hi there,
Thanks, it looks like a typo, I will ask the relevant team to fix it.
Best regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
22 May 2024, 12:04
Hi there,
Can you please clarify which example you are using?
Best regards,
Panagiotis
@PanagiotisCharalampous