fxDreema

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

    very simple request if you can help with this!

    Questions & Answers
    3
    13
    2235
    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.
    • R
      reader1 last edited by

      Hello all ,
      I am new to fxdreema and making EA . I just wanted to know how to get the high and lows from a group of candles. Say i want to get the high and low from the group of candles from 4am to 8 am and then buy or sell when the price breaches high or low . I am just stuck with getting the high and low part .

      Any help or suggestion or showing me how to do it would be very kind of you all .

      Long live the fxdreema community!

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

        @reader1 Hi! Try this condition

        0_1573363192850_s.JPG

        R 1 Reply Last reply Reply Quote 1
        • R
          reader1 @ambrogio last edited by

          @ambrogio thank you so much . so much appreciate this . that was what i exactly needed. thanks a million ambrogio.
          I will be asking lots of quesions in future . you are very helpful and knowledgeable!

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

            @reader1 you're welcome

            R 1 Reply Last reply Reply Quote 1
            • R
              reader1 @ambrogio last edited by

              @ambrogio morning. so i was trying to create a very simple breakout box ea. after your suggestion above i managed to build a working one. how do i put the stop loss as value of half of the box (sl = low + (high-low/2)), this formula will work for both buy and sell. i am new with variables. right now i could only put stop loss as low of the period for buy and high of the period for sell as you can see in pic.
              ![alt text](image url)
              0_1573550982972_68b5ef13-f319-4f3c-889e-3a4bdc17f4e8-image.png
              please advise me i am sure there is a simple way . thank you so much in advance

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

                @reader1 this is an example

                0_1573567794467_s.JPG

                R 1 Reply Last reply Reply Quote 1
                • R
                  reader1 @ambrogio last edited by

                  @ambrogio thanks again . yes that is absolutely what i need . the difference in price has been turned to the pips then /2 and then that is used as stop loss. but why *10000. can i use that number for any/all pairs .

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

                    @reader1 Because I turned pips the price level (useless), so below is better so that you do not have problems with YEN pairs 🙂

                    0_1573587828347_s.JPG

                    I've not tested

                    R 1 Reply Last reply Reply Quote 1
                    • R
                      reader1 @ambrogio last edited by

                      @ambrogio so i managed to sort that issue out ( stoploss half the box ). what i did was this ( high+low / 2) instead of focusing on high-low and thats it , it gives me exactly what i want as stop loss . i have assembled an EA have a look . tester result were ok not wow ( its just i was obsessed with the breakout box ea for last few days , so i had to finish it this way or that ) . i am putting it through demo tomorrow.
                      i am a newbie here let me know if there are any mistakes there or if anything could be done in different better way. my plan was to add few filters to this ea ( no trades if the box size is less than 10 pips or more than 50 pips , opening trades only during 8-2 gmt not other times ).
                      i would not have been able to make this without you showing me how to get the highest/lowest price value from the group of candle so THANK YOU very much .
                      https://fxdreema.com/shared/eKmveDhfb

                      T A 2 Replies Last reply Reply Quote 0
                      • T
                        trader.philipps @reader1 last edited by

                        @reader1 Looks fine so far. The only thing I'd do different is to store the relevent prices and SL level in variables. As you let the code run once per tick, that may have a better performance (CPU usage for instance).

                        I like to share my knowledge, but expect the others to contribute as well.

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

                          @reader1 Hi, i've not tested

                          https://fxdreema.com/shared/E636u1CA

                          1 Reply Last reply Reply Quote 1
                          • R
                            reader1 last edited by

                            @trader-philipps i agree with you but aren't the variables themselves calculated at every tick and then fed to/used by the main code so cpu still ends up doing the same amount of task . or can the high, low and stoploss be set as variables and not connected to the block save cpu from extra tasks. sorry if i dont make any sense lol i am a newbie .

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              trader.philipps @reader1 last edited by

                              @reader1 Of course you're right. Was somehow thinking you'd check multiple times. However, check the conditions block. You twice use the ask price, what probably is a mistake. I just saw that you use that twice so I thought to look price up and store it in a variable. I guess one condition should have a bid price.

                              0_1573688453213_Auswahl_664.png

                              I like to share my knowledge, but expect the others to contribute as well.

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

                              Online Users

                              M
                              C
                              K
                              T
                              K
                              D

                              14
                              Online

                              146.6k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors