fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Code is not working as expectation. Please help

    Questions & Answers
    2
    2
    351
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fxrobot 0 last edited by

      I am trying to develop a EA but, code is not working according to logic. (0_1573709285382_Avacado.PNG image url)

      What i'm trying to do:
      If no trade exist -> 10 MA(Moving average) is greater than 20 MA -> Buy 0.1 lot with Stop loss 50 pips, Take profit 50pips -> If any trade exist -> and 10 MA is less than 20 MA -> close the order (don't want to wait for 50 pips profit or 50 pips loss).

      ![alt text](0_1573709553230_Avacado2.PNG

      When I am doing testing, i notice that the trade is not closing until fulfill the 50 profit or 50 pips loss.
      What i'm want to do; I want to close the order if 10 MA less than 20 MA, even if it is doesn't fulfill 50 pips loss or profit.

      Your help will be greatly appreciated.
      if you any questions, please inbox or email me mymukul2005@yahoo.com
      Thank you.

      A 1 Reply Last reply Reply Quote 0
      • A
        ambrogio @fxrobot 0 last edited by

        @fxrobot-0 delete the link between block #3 and #6

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        Online Users

        A
        M
        E
        A
        E

        12
        Online

        146.7k
        Users

        22.4k
        Topics

        122.6k
        Posts

        Powered by NodeBB Forums | Contributors