Not logged in

Forums

Viewing 6 posts - 1 through 6 (of 6 total)

Forums>EA Wizard>Make my EA>More limit orders with distance

  • #201160 |
    Participant
    3 Posts

    Hello, I would like to ask if its possible to create following strategy in EA Wizard:

    Open long limit order if: Bid < EMA148 minus 100 points & MACD0 > MACD1

    Exit long: Bid > EMA148 or profit of all currently open trades > 40 USD (what will happen sooner)

    Money management:

    – minimum price distance between all limit orders is 50 points

    – minimum “bars” distance between two limit orders is 10

    – base (first) position size is 1 lot and all next are multiplied by coeficient 1,4

    So for example: Exponencial MA with period 148 is on price level 1,41000, bid is currently on level 1,40005. So one condition for long limit order is OK, as we are bellow 1,40900. Let assume MACD0 crosses over MACD1, so limit order with 0,01 lot will be set.

    But the price is not going hihger, but lower to 1,39999. Because distance between last limit order and actual bid price is less than 50 points ->  no additional limit order.  Then price is going even lower to 1,39989 and conditions for limit order are met again, but now limit order will be setup with 1,4 lot.

    Attached you can find how it looks in metatrader done manually.

    Thank you in advance for any idea.

    Attachments:
    You must be logged in to view attached files.
    #201173
    Administrator
    635 Posts

    Hello,

    this can be done I believe. I will try to make an example for this and post

    #201174
    Participant
    3 Posts

    Thank you in advance!

    #201448
    Administrator
    635 Posts

    Hello Namir,

    just a question about this: “Open long limit order if: Bid < EMA148 minus 100 points & MACD0 > MACD1”

    What will be the limit price for the order? You just want to place the limit at actual price? What if it does not get filled? How long does it stay active active?

    #201497
    Participant
    3 Posts

    Hello, sorry for later answer.

    The limit price will be 100 points above actual EMA148 price for short limit order. So when actual EMA148 price is 1,18500, then short limit price is set to 1,18600 (100 points above this EMA).

    If the short limit price will be not filled, then it should be deleted when price crosees bellow EMA148. (so it is not valid for xy bars, but intil price touch EMA).

    Also when Take profit will be realized, all not filled limit prices should be deleted and strategy should start “from beginning”.

    Thank you

    #201520
    Administrator
    635 Posts

    Hello,

    I have completed the basic structure for long trading. See the file attached.

    Attachments:
    You must be logged in to view attached files.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.