Results 1 to 4 of 4
 1 Attachment(s)    

Thread: The Alternating M A (E A Request)

  1. #1

    Default The Alternating M A (E A Request)

    THE SIGNAL

    The signal to go long is when the 5 ema of the closes exceeds the 5 ema of the opens.
    The signal to go short is when the 5 ema of the opens exceeds the 5 ema of the closes.

    THE LOTS

    Both the long and the short signals will generate 2 orders a few seconds after they are received.
    The 2 orders will have identical entry points but they will differ in exit strategies.
    The first order, called the X portion, will exit on a Take Profit of 15 pips or on an ema reversal, whichever is the soonest.
    The second order, called the Y portion will exit on the ema reversal or on a trailing stop of 30 pips after a paper profit of 60 pips is achieved.

    THE ALTERNATING EMA

    If the X portion of the trade is signaled to be activated without the 15 pip profit being attained then the E A will recompute the moving average from an 5 ema to a 10 ema. If the new ema still indicates a reversal then the Long (or Short) will be closed and 2 new orders (X and Y) will be generated. If a reversal is not dictated by the new ema then the current position will be maintained.

    The 10 ema will now be used for future trades until the next time the X portion of the trade fails to achieve the 15 pips Take Profit. Then the E A will recompute the moving average from 10 ema to 5 ema. The moving average will then alternate between 5 and 10 on each subsequent failure of the X portion to achieve 15 pips

    An emergency Stop Loss of 100 pips should be included in the E A.
    The respective ema's and all of the pip values should be input variables.

    Thank You

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by JXBlack View Post
    THE SIGNAL

    The signal to go long is when the 5 ema of the closes exceeds the 5 ema of the opens.
    The signal to go short is when the 5 ema of the opens exceeds the 5 ema of the closes.

    THE LOTS

    Both the long and the short signals will generate 2 orders a few seconds after they are received.
    The 2 orders will have identical entry points but they will differ in exit strategies.
    The first order, called the X portion, will exit on a Take Profit of 15 pips or on an ema reversal, whichever is the soonest.
    The second order, called the Y portion will exit on the ema reversal or on a trailing stop of 30 pips after a paper profit of 60 pips is achieved.

    THE ALTERNATING EMA

    If the X portion of the trade is signaled to be activated without the 15 pip profit being attained then the E A will recompute the moving average from an 5 ema to a 10 ema. If the new ema still indicates a reversal then the Long (or Short) will be closed and 2 new orders (X and Y) will be generated. If a reversal is not dictated by the new ema then the current position will be maintained.

    The 10 ema will now be used for future trades until the next time the X portion of the trade fails to achieve the 15 pips Take Profit. Then the E A will recompute the moving average from 10 ema to 5 ema. The moving average will then alternate between 5 and 10 on each subsequent failure of the X portion to achieve 15 pips

    An emergency Stop Loss of 100 pips should be included in the E A.
    The respective ema's and all of the pip values should be input variables.

    Thank You
    Hi JXBlack,

    Here is The Alternating MA EA.
    Attached Files Attached Files

  3. #3

    Default

    Many thanks.

    I want to have 2 or 3 X lots for every Y lot.
    Where do I set the number or ratio of X to Y lots.

    Thanks again

  4. #4

    Default

    Dear Funyoo

    My intention with this E A is to use it on longer time frames, but in order to give it a test I put it on 9 15 minute Demo charts and after 5 hours their were no trades although I saw numerous crossovers of the open and close ema's. The journal said that all 9 charts had loaded the E A successfully.

    I plan to close this E A during relevant major news times, therefore I really hope that the E A can be designed to make an entry into the market as soon as the next candle is closed after I put it back up after the news break.

    Of course it is essential that I can assign different lot sizes to the X and Y portions of the trade. I think I will start out with .20 or .30 for the X portion and .10 of the Y portion. I will then handle money management manually

    I would also like to be able to use an ECN broker.

    Thanks again for your kind efforts on my behalf.

Similar Threads

  1. Opening at price and alternating orders
    By luisneves in forum MQL programming
    Replies: 0
    Last Post: 01-15-2013, 11:15

Tags for this Thread

100, 100 pips, average, broker, candle, demo, ecn, main, moving average, news, pips, profit, request, signals, stop, strategies, test, time, trailing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •