Chart Events in Meta Tester

 

Hi Everyone,

I have a panel expert advisor that allows me to place orders when certain conditions are met. The panel works great in the terminal but when i try using it meta tester it appears but does nothing when i click on its buttons. I was wondering if i did something wrong or if the ChartEvents function is not implemented on meta tester. Any help will be appreciated. Thanks.

 
the ChartEvents function is not implemented on meta tester.
 

Hi Keith,

do you know of any way i can use panels on meta tester. A temporary fix perhaps?

 
adrianguya:

Hi Keith,

do you know of any way i can use panels on meta tester. A temporary fix perhaps?

Yes, in OnTick() check the state of the buttons then carry out the same code as you have in OnChartEvent().

 

You can also use an indicator that catches the OnChartEvent and feeds it back to the EA.

So you can set the buffer to different values that represent different buttons being clicked.

Then you can add the indicator as a resource and your good to go.

 
Keith Watford:

Yes, in OnTick() check the state of the buttons then carry out the same code as you have in OnChartEvent().

Do you happen to have a code snippet for this?
Marco vd Heijden:

You can also use an indicator that catches the OnChartEvent and feeds it back to the EA.

So you can set the buffer to different values that represent different buttons being clicked.

Then you can add the indicator as a resource and your good to go.

I will give this a try.
 

The simpolest way is to monitor:

bool buttonstate = ObjectGetInteger(chart_id,object_name,OBJPROP_STATE);

That requires you to write the code and check for every button.

Otherwise you can do it by using chart_event in an indicator.