|
yes, well, no: that logic (with the word 'static' added) would be to stop the EA go past on other than the first tick on a bar; thus, then the EA is only allowed to make a trade at the first tick on a bar. Regardless of whether there is an open trade or not. E.g., in a daily time frame, only the first tick after midnight would be a trade option.
Right solution to a different problem.
And, as Kalenzo pointed out, it's probably / possibly appropriate to also tie up the logic by magic number to the subset of trades managed by the EA. Which is another reason for inspecting the trades table.
|