Weird behavior with _ChartToolBar_Trading_ strategy

Questions about MultiCharts .NET and user contributed studies.
franky
Posts: 24
Joined: 25 Nov 2012
Has thanked: 4 times
Been thanked: 4 times

Weird behavior with _ChartToolBar_Trading_ strategy

Postby franky » 01 Apr 2014

I'm having problem with the _ChartToolBar_Trading_ strategy.

If I have a position and my chart resolution is 1 minute or more....and then I add the _ChartToolBar_Trading_ strategy, the market panel on the toolstrip will work.

However, If a have a position and my chart resolution is 100 volume constant bar and then I add the _ChartToolBar_Trading_ strategy, the market panel on the toolstrip will not work unless you switch the chart resolution to a x minutes res !!!!!

How come the resolution has an effect on the TradeManager.TradingData event !!!
I don't get it !!!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby Henry MultiСharts » 01 Apr 2014

Hello franky,

What exact version and build number of MultiCharts are you running? (in MultiCharts go to Help tab-> About)
Are you able to replicate this behavior on a constant basis?
Have you modified the prebuilt _ChartToolBar_Trading_ signal?

franky
Posts: 24
Joined: 25 Nov 2012
Has thanked: 4 times
Been thanked: 4 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby franky » 01 Apr 2014

I'm using .net version 8.8 build 8595

Yes I can replicate it all the time !!
No I did not change anything on the code.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby Henry MultiСharts » 02 Apr 2014

franky, please go to Format->Strategy properties->Auto trading tab->Select broker plugin->select the profile you need.

franky
Posts: 24
Joined: 25 Nov 2012
Has thanked: 4 times
Been thanked: 4 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby franky » 02 Apr 2014

Seems to work with CQG Broker profile ... but not with Interactive Brokers profile !!! Is there a reasons ?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby Henry MultiСharts » 02 Apr 2014

Seems to work with CQG Broker profile ... but not with Interactive Brokers profile !!! Is there a reasons ?
It works ok on our end. Do you use broker profile different from data provider on this chart? Have you configured symbol mapping?

franky
Posts: 24
Joined: 25 Nov 2012
Has thanked: 4 times
Been thanked: 4 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby franky » 02 Apr 2014

Yes I did use the right Broker profile and the right symbol mapping. Weird enough ... it's the panel data which doesn't work ... not the buy or sell button. So because the buy & sell button works well, I suppose the broker profile is right .... however ... when chart data resolution is in contract bar ... the panel data is not updating ....
I tried it using the chart data from IB or from IQfeed ... and same result... which shouldn't change anyway.
I'm clueless !!! ... it's the original code ... how can you make it work ? Do you change the parameters in the IB broker profile ? How come the poss_changed event stop working when using constant volume bar chart !!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby Henry MultiСharts » 03 Apr 2014

franky, please attach a screenshot demonstrating this behavior and the workspace you are using.
You can also come to our live chat Monday-Friday 6:30 am - 3 pm EST to demonstrate this behavior remotely and we will collect all required for analysis information.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Weird behavior with _ChartToolBar_Trading_ strategy

Postby Henry MultiСharts » 03 Apr 2014

In CalcBar please add the following line:
TradeManager.ProcessEvents();

So that is looks like that:

Code: Select all

protected override void CalcBar()
{
if (Bars.LastBarOnChart)
ExecControl.RecalcLastBarAfter(TimeSpan.FromSeconds(0.5));
TradeManager.ProcessEvents();
}

The issue was that the RecalcLastBarAfter counter was raised too fast on contracts resolution, unable to hit the specified 0.5 seconds timeout.


Return to “MultiCharts .NET”