fxDreema

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

    Problem with custom indicator ex5

    Bug Reports
    2
    48
    16435
    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.
    • tcanuto
      tcanuto last edited by

      Hello

      EA does not work with turtle trading custom indicator for MT5. As you can see, manually added the indicator data. Also added the indicator in the indicators folder.

      Error: 2014.06.22 17:32:25 Tester expert file C:\Users\Thiago\AppData\Roaming\MetaQuotes\Terminal\FE0E65DDB0B7B40DE125080872C34D61\MQL5\Indicators\pz-turtle-trading-mt5 1.0 open error [2]

      Link to my project: http://www.mql5.com/en/market/product/1804

      ......
      pz-turtle-trading-mt5.ex5

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

        Probably input parameters are not correct. Here is what I used and it works for me: http://prntscr.com/3voovo
        Here is some test: https://fxdreema.com/shared/ywfH0oDJd

        I think you should work with candle ID of 1 or more, because at 0 it gives EMPTY_VALUE (a very big number) all the time. try block "Indicator appear", or something else from "Indicators" category.

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

          I made the correction indicator, but is still not working.

          I can not hide the indicator, because I need to study.

          If possible please correct indicator for me so I can test it.

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

            Indicator names must be the same as the file names (without extension). Your was "pz-turtle-trading-mt5 1.0", while the indicator file name is "pz-turtle-trading-mt5.ex5". Also I fixed some datatypes from double to bool, but this is not so important.

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

              Thanks fxDreema. Now yes I can see the indicator.

              But I have a problem. I can not operate the buy and sell orders. I tried the simplest way, but still does not work.

              I need to work.

              Also accurate that when the first order is triggered, the second need not trigger. The second signal will only be triggered when the first signal is closed negative.

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

                I always recommend to use "Indicator tester" before doing anything else with a custom indicator. Also somewhere above I said that this indicator gives us values when Candle ID >= 1. How do I know that? I used "Indicator tester" 🙂

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

                  Okay, thanks. Have tested candle ID 1, 2 and 3, but still without opening orders. I'm testing the buffers 0 and 1.'s Going to be?

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

                    Try this: https://fxdreema.com/shared/ojzKofPgb

                    I'm not sure about the way positions are opened, I used those blocks in the way you use it, but at least indicator signals are there

                    And please, try "Indicator tester" block at least once

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

                      __Try this: https://fxdreema.com/shared/ojzKofPgb

                      I'm not sure about the way positions are opened, I used those blocks in the way you use it, but at least indicator signals are there[/quote:3jab1t6z]
                      I tried this way, but only open orders to sell, but not buy.

                      __And please, try "Indicator tester" block at least once[/quote:3jab1t6z]
                      Yes, I did the test indicator, and I only came with 16 digit numbers e+308

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

                        ____Try this: https://fxdreema.com/shared/ojzKofPgb
                        __And please, try "Indicator tester" block at least once[/quote:3oo9e1do]
                        Yes, I did the test indicator, and I only came with 16 digit numbers e+308[/quote:3oo9e1do][/quote:3oo9e1do]
                        Which means something 🙂 It's not that "Indicator tester" is broken. That value is when the line is not visible.
                        Using "Indicator tester" from the last project I shared, I get this: http://prntscr.com/3yfgg2

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

                          I got it! This working buy and sell. Had to put a block of "close position" preceding the "If position is running"

                          Now I wonder how I do to filter orders?
                          It's like this ... when the first order closing profitable, the second order does not open, only the third.
                          That is, if the previous order is negative, the next order can be opened. If the previous order is positive, the next order does not open.

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

                            What is "order" for you now?

                            In any case, "For each Trade" (and other "For each..." blocks) can load certain trade or order, look at the option "Not more than...". But if you use one of these blocks, you most probably have to use another pink blocks, and the problem is that most of the people don't get how to deal with these blocks and I don't know why 🙂

                            Or there is a block "Check last closed trade profit"

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

                              May be using the block "Check last closed trade profit", but as I do to be fired the first position, without having closed earlier another position?

                              The first needs to be activated, and then run this rule.

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

                                I'm confused, I don't understand your english in the last 2 posts.

                                Let's say this:
                                Trade = running, not closed order in MT4.
                                Order = Pending order.
                                Position = running order in MT5.

                                Now, what needs to be done, step by step?

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

                                  Sorry fxDreema. I think I expressed myself badly. This case is the "positions".

                                  I tried to put this block, but as he had no position previously driven, not opened any order, logically.

                                  I need the block "Check last closed trade profit" or another similar block, run from the second open position, based on the first, obviously.

                                  If in case the 1st previous position is profitable, not open the 2nd position. Only the 3rd position opens.
                                  If any previous position be closed with the loss, you can open the next.

                                  Could you please show me a sample project that works this way?

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

                                    Is the problem that when backtesting there is no any position in the history, so the block can't calculate something for something that does not exists?

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

                                      I think I fixed that, the block will pass while there is nothing in the history

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

                                        Ok Thanks fxDreema. I'll be testing the fixed block.

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

                                          I tried, but unfortunately could not make it work these blocks. I can not filter lose when it has to open the next position. This opening at all times.

                                          I also saw that no risk management Ryan Jones on the block "Buy Now (Custom Martigale).

                                          Strategy:

                                          The Entry Strategy
                                          The Turtles learned two breakout variants or "systems". System One (S1) used a 20-day price breakout for entry. However, the entry was filtered by a rule that was designed to increase the odds of catching a big trend, which states that a trading signal should be ignored if the last signal was profitable.

                                          But this filter rule had a built-in problem. What if the Turtles skipped the entry breakout and that skipped breakout was the beginning of a huge and profitable trend that roared up or down? Not good to be on the sidelines with a market taking off!

                                          If the Turtles skipped a System One 20-day breakout and the market kept trending, they could and would get back in at the System Two (S2) 55-day breakout. This fail-safe System Two breakout was how the Turtles kept from missing big trends that were filtered out.

                                          The entry strategy using System Two is as follows:

                                          Buy a 55-day breakout if we are not in the market;
                                          Short a 55-day breakout if we are not in the market.
                                          The entry strategy using System One is as follows:

                                          Buy a 20-day breakouts if last S1 signal was a loss;
                                          Short a 20-day breakouts if last S1 signal was a loss.
                                          The Turtles calculated the stop-loss for all trades using the Average True Range of the last 30 days, a value which they called N. Initial stop-loss was always ATR(30) * 2, or in their words, two volatility units. Additionally, the Turtles would pile profits back into winning trades to maximize their winnings, commonly known as pyramiding. They could pyramid a maximum of 4 trades separated from each other by 1/2 volatility unit.

                                          http://www.mql5.com/pt/market/product/1 ... escription

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

                                          Online Users

                                          S
                                          M
                                          E
                                          G
                                          D
                                          A
                                          A

                                          26
                                          Online

                                          146.7k
                                          Users

                                          22.4k
                                          Topics

                                          122.6k
                                          Posts

                                          Powered by NodeBB Forums | Contributors