fxDreema

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

    Please help how to Turn Off Turn On buy sell block and close all trade in Friday 23:58-23:59 GMT to prevent the huge gap which is very important.

    Questions & Answers
    2
    3
    963
    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.
    • zarbitz
      zarbitz last edited by zarbitz

      0_1580881244609_snap_screen_20200205131857.png

      Hi let say I want to close my all trade at Friday 23:58 GMT then also turn off my Buy block number 58 and Sell block number 69, then after 23:59 the EA will turn on the Buy block number 58 and Sell block number 69 again. I don't know how to do that and not sure that I made in picture correct or not, if not please recommend and make some easy example please. thank you and Best respectfully.

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

        @zarbitz Take a look at my Tutorial EA I published recently. Actual Project Link: https://fxdreema.com/shared/Udh0CS5Ud

        There I do similar things. For close on Friday, I have defined a constant in order to switch that feature ON/OFF).

        On the On Init tab I have a condition that sets a flag to true or false depending on the configured parameter (instead of flag you could also use Turn ON /OFF blocks.

        0_1580902250182_d678ade2-9dc1-440a-a659-65f64b73f546-image.png

        Assuming the CoF flag is set to true, I have on the on Tick tab the following separate path.

        0_1580902337261_3617d9f0-f307-4ffd-860b-32cf6de2d093-image.png

        The last block connects to the central close Trades block.

        For Turning ON/OFF trade entries take a look at this tree on the on Tick path ..

        0_1580902457275_4e3ad007-9936-4468-b378-baceea7a97b1-image.png

        So Monday to Thursday I have different trading hours. On Fridays, if close on Fridays is true, I will disable the entry tree at the same time as the close should happen (in order to avoid that after closes new trades are opened again).

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

        zarbitz 1 Reply Last reply Reply Quote 1
        • zarbitz
          zarbitz @trader.philipps last edited by

          @trader-philipps thank you very much sir. this very helpful. I'm appreciate.

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

          Online Users

          S
          F
          C
          A

          11
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors