Quote:
Originally Posted by WNW
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?