Limiting trades with an EA
Results 1 to 6 of 6

Thread: Limiting trades with an EA

  1. #1
    My EA relies on a EMA crossover. It finds trades efficiently but over transactions. Whenever it closes out a transaction, if the terms haven't changed it opens another and another. For scalping purposes I only need the transaction right after the crossover and also get out until the next cross.

    Will there be a means to restrict the transactions to only take one until the direction changes and there's a new crossover? https://forexintuitive.com/forex-tra...sd-8816-a.html

  2. #2
    Because most crosses are buy, sell, buy, sell...

    only read thru the background and only allow the opposite of the final order. This will cut the number of orders quite a bit.

  3. #3
    Trade restricting with crossovers are easy. Post your codes here and anybody people can make those adjustments.

  4. #4
    The code concept is simple.

    FastEMACurrent
    FastEMAPrevious
    SlowEMACurrent
    FastEMAPrevious

    if(FastEMACurrent gt; SlowEMACurrent FastEMAPrevious lt;= SlowEMAPrevious) Cross Long.

    Basically, in order to determine a cross, the order of slow and fast ought to be switched.

    I composed a Generic MA crossover EA awhile ago. Is there some reason why you would rather not use that?

  5. #5
    It's very hard to read when they are unindented since you didn't use code tags.

    Can you just post the code document as an attachment in a post?

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information