fxDreema

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

    Is this ok?

    Questions & Answers
    3
    7
    1914
    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.
    • drayzen
      drayzen last edited by drayzen

      Just put together my first EA and wondering if this should work?
      https://fxdreema.com/shared/va8vDDqFc
      I know I don't have any close functions, just did this with <10 connections so I could export it and test prior to getting a subscription.

      The logic is:
      If Indicator > Open and/or Indicator > Close on current bar then Buy (then inverse for Sells)
      I've got the two 'Once per bar' so that there can be two trades opened per bar, one for Open and one for Close.
      I'm expecting this will open multiple trades in both directions.
      The close condition once applied would be to close all trades when 'x' profit reached.

      I get a lot of errors in the Journal which I have no idea what they're meaning, and for some reason it's got a Variable in MT4 inp10_VolumePercent that I have no idea where it's come from...?

      0_1524386655152_Tester Journal.png

      thanks guys 🙂

      ..the alien does not concern itself with the opinions of humans..

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

        The "once per bar" works only at the beginning of each bar, so the price is essentially the open price. That's why its not very beneficial to check both open and close prices at the first tick, because they are the same.
        I would use this logic:
        0_1524395134722_4dcda498-4cda-4fed-8b60-438fe64c41e4-image.png

        In English: once per bar we check the current candle open (current candle = id 0) and compare it to the indicator (blocks 5 and 6).
        If that condition is true -> open trade

        • Note that block 6 comes only when 5 is false, because they BOTH can never be true!

        Then check close price, and not current candle close but LAST candle close (id 1) (blocks 7 & 😎

        Note that this is somewhat silly logic because 2 of the 4 conditions must always be true - the bot trades 2 times every bar!

        https://fxdreema.com/shared/MXDDelZeb

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        drayzen 1 Reply Last reply Reply Quote 1
        • drayzen
          drayzen @roar last edited by drayzen

          Hi @roar ,
          Thanks for your help, I realise it seems a bit nonsensical but the idea was to accumulate as many valid trades as possible, without going completely bananaz and opening one for every tick, so two/bar seemed reasonable... 😉
          I'd forgotten that 'Close 1 = Open 0' and it was only after I ran a visual backtest and saw it opening two trades on Open I had that 'duhhh' moment, but no biggie it's doing near enough to what I was thinking.

          I had a go rebuilding it from scratch and it no longer had the inp10_VolumePercent value in MT4 and it then traded as I expected instead of sitting there doing nothing. So I think that was the root cause my confusion.
          I think it might be some sort of fxDreema UI bug where I clicked next to a value somewhere that has no tick box and it was added as a variable anyway. I've been using FF so I'll switch to Chrome for working with this which will hopefully avoid weirdness like that.

          So should I just ignore all those errors?

          ..the alien does not concern itself with the opinions of humans..

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

            "inp10_..." refers to block #10 - you dont even have block #10, so thats strange indeed.

            I am not sure about that TestGenerator error, it seems to be warning about your trade size (as you trade every candle and never close)

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            drayzen 1 Reply Last reply Reply Quote 0
            • drayzen
              drayzen @roar last edited by drayzen

              Hi @roar
              I'd been thinking about the way you daisy-chained those Condition blocks, do you know if they both execute on the same tick, or does the false output on the first only become active on the following tick?

              Also after thinking about my logic it was pretty stoopid. xD
              I'm doubling trades when I could just increase exposure, or even better diversify!

              I found I was able to cut it right back to just four blocks, Once per bar > Condition > Buy / Sell.
              It does mean that one side of the condition also hits on an == status but made it extremely simple!

              ..the alien does not concern itself with the opinions of humans..

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

                They all execute on the same tick, no matter if there was 1000 horizontally connected blocks 🙂

                Need small help? Tag me in your post
                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                1 Reply Last reply Reply Quote 1
                • fxDreema
                  fxDreema @drayzen last edited by

                  @drayzen said in Is this ok?:

                  I get a lot of errors in the Journal which I have no idea what they're meaning, and for some reason it's got a Variable in MT4 inp10_VolumePercent that I have no idea where it's come from...?

                  I only have an idea what these errors mean. They are not because of the EA, but because of the ticks data. You probably know that MT4 has data for each timeframe - M1, M5, M15 and so on... When you are testing on H1 let's say, data from lower timeframes is used. But sometimes we have periods of missing data and I think the problem is because of this. It could be something else, I don't know how exactly the backtest works, but the problem is for sure because of the quality of the ticks data.

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

                  Online Users

                  S
                  Z
                  E
                  H
                  J
                  S
                  S
                  C

                  17
                  Online

                  146.8k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors