fxDreema

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

    Price cross indicator

    Questions & Answers
    2
    8
    3076
    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.
    • A
      aminghbha last edited by

      Hi.. How to create EA for the following set of rules:

      1. Only one trade per day
      2. For buy, price cross above moving-average-20-simple earlier of the day (got trouble on creating this rule)
      3. Price then cross previous day resistance
      4. buy entry trigger
      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        I can see you are trying something in your profile, but I don't fully understand your rules here. When you make such robot, you must be absolutely specific in each rule. "earlier of the day" means nothing, as well as "previous day resistance" if that resistance is not a specific value.

        What I can say... instead of using AND, just connect the blocks one after another. Be careful with those "Close trades" blocks, you don't want to be in a situation when the condition to open a new trade is the same as the condition to close all trades for more than one tick.

        1 Reply Last reply Reply Quote 0
        • A
          aminghbha last edited by

          Hi..
          Thanks for your respond, I'm currently building an EA with several conditions, i'm struggling to meet the requirement for the 1st condition where the candle touch an MA line once (it stays valid for 1 day only) then proceed to check consecutive conditions?

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            Maybe by using some Variable like this - https://fxdreema.com/shared/hz8U6c5Ac
            This is also something that can be used - https://fxdreema.com/demo/mt4-wait-crossovers

            1 Reply Last reply Reply Quote 0
            • A
              aminghbha last edited by

              I have a question about creating a condition when there is no way of knowing its Candle ID. It could have happened one, two, three, or more bars earlier from a second condition that creates the sell signal.

              For example, I would like to sell when 2 conditions meet

              First Condition
              When price touches yellow line MA (Arrow on drawing).

              Second Condition
              Entry sell when MA close below red line (red line on drawing)

              How can I set this up if I do not know the exact candle ID when it touch the yellow line (first condition). Please see attached image

              ......
              Capture.PNG

              1 Reply Last reply Reply Quote 0
              • fxDreema
                fxDreema last edited by

                Check what I posted in my previous post.

                Also, there is a block "Indicator moves within limits" and this block is something like Condition that iterates through multiple candles

                1 Reply Last reply Reply Quote 0
                • A
                  aminghbha last edited by

                  Hi.. I need help to create ea for the following conditions:

                  H1 time frame
                  Duration: 00:00hrs to 23:00hrs

                  Sell condition

                  1. a. Price/ Candlestick(H1) touch MA 20-simple-close OR
                    b. Price/ Candlestick(H1) crosses below MA20-simple-close

                  Once either one of this condition meet (valid), then the logic goes to condition 2.

                  1. Price continues to go downwards, then Candlestick (H1-close) is below previous day Candlestick (D1- Index:1)

                  Once this condition meet (valid), then the logic goes to trigger sell entry

                  IF condition 1.a OR 1.b do not meet then the logic will not proceed to condition 2 hence sell entry will not trigger.

                  Hope my explanation is clear and I attached snapshot for further clarification. Really hopeful that you can guide me to create this EA.

                  ......
                  2016-06-03_1848.png
                  2016-06-03_1855.png
                  2016-06-03_1856.png

                  1 Reply Last reply Reply Quote 0
                  • fxDreema
                    fxDreema last edited by

                    In general:

                    1. If at the current moment you can get information about candles and indicator from the history, do that, this is the best way
                    2. Using Variables to store states. You check some condition and set the value of some Variable to something, this is entirely custom. In other blocks you check what is the state (the value of the Variable) and depending on that you do something else. The downside is that if MT4 crashes, Variables are gone, they are temporary memory.
                    3. This https://fxdreema.com/demo/mt4-wait-crossovers. But here all steps must happen one after another. I mean, block 1 will not run again until block 2 passes.
                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    Online Users

                    14
                    Online

                    146.8k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors