Download MetaTrader 5
To add comments, please log in or register
Copy the deals of successful traders. Subscribe to signals!
Repions
99
Repions 2016.06.13 23:00 
I use button to open a trade in dialog.mhq  . everything goes well on a little tick, but often fail at busy tick(I've widened the slippage).
I use OnChartEven to catch it. I've been trying to get through all
OnTick procedures with Ctrl keyboard, but did not improve.

Is there a suggestion that I should do ..? thank you

void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam
                  )
  {
   CWinDialokMain.ChartEvent(id,lparam,dparam,sparam);
   keyCtrl=false;
   if(id==CHARTEVENT_KEYDOWN) {if((int)lparam==17) {keyCtrl=true;}}

....
.....
....
void OnTick()
  {
   if(keyCtrl==true)  return;
...
......
..
/
To add comments, please log in or register