View Single Post
  #20 (permalink)  
Old 10-01-2007, 10:28 PM
HerbertH's Avatar
HerbertH HerbertH is offline
Member
 
Join Date: May 2006
Posts: 88
HerbertH is on a distinguished road
Quote:
Originally Posted by WNW View Post
Thanks again for your reply.

I'm not a coder and am not familiar with MQL syntax.

When you say "enclose" what does that mean in terms of which characters to use? Can you provide an example?

Thanks.
With enclose I mean putting your code in between the { } brackets of the code snippet I showed you.

For example:
Code:
int start()
{
     if(Timestamp != iTime(NULL,0,0))
     {
          Timestamp = iTime(NULL,0,0);

          CheckForNewTradeSetup(); // This will be where you put your code which is only allowed to run once every new bar
     }

     CheckOpenTrades();    // This will be where your code is placed, which will run every tick
}
The example shown above will check to open new trades once every new bar,
but will check existing open trades (e.g. to handle breakeven etc) every tick.

Hope this helps

PS. If you are not a coder and this expert is not functioning properly, why don't you just have the original coder have a look at this?
__________________
Better being out wishing to be in, than being in wishing to be out.....
Reply With Quote