fxDreema

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

    open and close trade at specific time

    Questions & Answers
    3
    8
    3446
    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.
    • M
      mctrade last edited by

      Hi,

      I would like to open and close a trade at a specific time with the format hh:mm:ss but regardless if their is a tick or not.

      For example buy 1 Lot Dax at 12000 points at 12:15:45 and close it at 16.15:30.

      How do I do this?

      At the moment I have an EA programmed which open and close it in a time window, when there is a tick (...with "time filter" and "on tick" slide). But when there is no tick at the specific time window, than the EA does not set a pending order or close it.

      Thanks
      Marc

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

        You can try this under "on Timer". But note that this event can't be backtested, because the Tester runs the EA by ticks 🙂

        1 Reply Last reply Reply Quote 0
        • M
          mctrade last edited by

          Thanks,

          but in the help it says: "Timer event - repeats on some period of time, for example on every 60 seconds"

          I don't want it do that every for example 60 seconds.

          What I forgot to tell was that I want to set the pending order on a specific time, the trade is only opened, when the high of last candle is broken on current candle.

          so what is the starting point of that "on timer" counter? The opening of the Trade? But therefore it is not always the same time until the trade should be closed.

          thanks

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

            The Timer starts with the EA normally. This is a clock and does something on a regular basis. Then it runs once on every X seconds. But it does not care about the ticks. You can have 0 ticks in 10 minutes, but the Timer will run on every X seconds.

            I'm suggesting this event because you want specific time that does not depend on ticks. But I don't think that you really need it, I think that the time period can work well. Something like Time filter -> Once per bar, or the opposite.

            1 Reply Last reply Reply Quote 0
            • M
              mctrade last edited by

              Hi,

              unfortunatly I'm still trying to set up an EA that sets a pending order at the high of the current bar on a specific time, lets say 16:39:55 local time independent of the time activating the EA and independent of a tick.

              But I don't get it. I would be glad if anybody could help me an excample on how to do it?

              Many Thanks in advance for any help!

              1 Reply Last reply Reply Quote 0
              • M
                maurysvva last edited by

                Your request it's similar to my topic ("once per bar, working on open or close of a candle").
                You can't set a pending order in the high of the current bar on a specific time, because you don't know the current high price, the price could rise again. it's also impossible to backtest a similar EA...the high price is that when the candle is completed. Conversely it's possible to set a pending order at the high of the previous candle (candle ID:1).
                I suggest you to use "once per bar"...waiting to the confirmation in my topic...

                1 Reply Last reply Reply Quote 0
                • M
                  mctrade last edited by

                  Yes you are right, but how to I "code" setting an pending order on the open of a candle at a specific time, lets says the candle of 10:30:00 of the timeframe 30min?

                  I don't get it worked...

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

                    Like this? http://prntscr.com/7ik1x6

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

                    Online Users

                    E
                    R
                    S
                    A
                    B
                    N
                    M
                    A
                    T
                    V
                    M

                    23
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors