MetaEditor Question

thread: MetaEditor Question

  1. #1
    Junior Member OXRAYNLATIN's Avatar
    12

    MetaEditor Question

    I'm using MetaEditor (v. 3.83). I have just begun the process of attempting to teach myself the way to make use of this instrument.

    I have some background in coding, but that was a few majors and several ages back. So there are only a few cobwebs floating around that are not happy about being upset.

    My very first attempt is only a very simple test run of opening a long position if the previous bar's close was up and a short if the previous pub was reduced.

    The simple structure was simple enough to install, but then I noticed a problem I'm not sure how to approach.

    When I hit either my Stop reduction or make Take Profit numbers before the close of the current bar, and shut the position....on the next tick, a new position is opened as it is still a fact that the prev pub has not changed (meaning that if the very first buy was a lengthy, then I open a second long on precisely the same bar).

    Basically, how do I code to tell ME not to open a second position on precisely the same pub?

    Thanks,

    Jonathan

  2. #2
    Junior Member OXRAYNLATIN's Avatar
    12
    Thanks for the links guys. This was just what I wanted.


    Jonathan

  3. #3
    Junior Member djkalyspain's Avatar
    25
    Read the section titled How to specify the beginning of a new pub? In

    http://www.metaquotes.net/experts/articles/feat_expert

  •