fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Boferer
    3. Posts
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 26
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Boferer

    • RE: Close all trades not working

      Okay! I think I found the culprit everyone. It was the floating spread which widened too much during some periods of the test thats why it didnt close 😄 The solutions provided here do indeed work 🙂 Please, accept my sincere apology for the trouble and I thank wholeheartedly everybody who tried to help. It means the world to me.

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @miro1360 As I´ve sent in the screenshot above, they are all opened in the same EA. The same thing happened in MT5, trades are opened and then they do not get closed until the backtest is over. Also, there were more long trades open than short ones and the trend was bullish so it had to be in profit at some point. @ambrogio there are no buy/sell orders, only market orders which go through immediately. I have stopped the EA randomly during the tests to see if the thesis that they are not in a profit holds and the EA stopped in profit a couple of times when I stopped it so the argument that the trades are simply not in profit does not hold true in this case.

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @miro1360 Tried it and it didnt work.. 😞 Isnt there a way how to do this which is.....more simple?

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @miro1360 Will do!

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @miro1360 Thank you for your reply Miro!

      So what is it you are suggesting I should do to resolve the issue? Sorry if I misunderstood it, but its a lot to take in.

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @boferer Still didnt manage to find the mistake..

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @hadees I did, didnt work 😞

      https://imgur.com/a/YdcbBGy

      Another thing I noticed is that when I approach the problem from a different angle and do condition balance is bigger than equity, then it triggers the close trades block, but when its reversed (e.g. equity is bigger than balance, then close) it wouldnt work.

      However, it should be noted that your approached DID in fact trigger the blocks, but the desired function is still not there. The trades somehow close randomly (e.g. when the equity is even +7-14 the trades do not close sometimes)

      https://imgur.com/a/V2Hg6XW

      Here you can see the visual and the equity line. The trades do not close when the equity is +2 above the balance, but rather close randomly it seems.

      Would having in there something like this help? https://imgur.com/a/vBhaHGc

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @hadees Nope. Doesnt work unfortunately. We need to somehow define the profit. I think the EA does not know what the profit truly means.

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @hadees No, the ea is supposed to run every tick so I am not sure if I need it there or if its okay to leave it out.

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @miro1360 Doesnt work 😞 I dont seem to know why...maybe its because of MT4? I dont understand.

      This is what the whole ea looks like https://imgur.com/a/zwxAzlV
      Cant wrap my head around whats wrong

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      Im thinking the EA doesnt know whats profit because it works on all occasions besides the one with profit

      posted in Questions & Answers
      B
      Boferer
    • RE: Close all trades not working

      @boferer Any help would be heavily appreciated! 🙂 It seems like my ea cannot execute the check profit unrealized for some reason. Any idea why that is?

      posted in Questions & Answers
      B
      Boferer
    • Close all trades not working

      Hello!

      I am trying to close all the trades when they are in total profit of 2 (e.g when your unrealized profit on the account is 2 so for example, the balance is 200 and the equity is 202, then all the trades including the losing ones should get closed)

      I tried this out, but for some reason it does not work. Any help? Its in the "on tick" tab as well. I tried putting it into on trade as well, but nothing happened.

      I have already browsed the forum and found similar issues, but when I implemented those solutions, they didnt work either.

      https://imgur.com/a/oh30NKI

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      @fxdreema https://imgur.com/a/TLfta1W

      This is what I tried out.

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      So in the end, it seems we got it to work! One more thing I need help with though: I want to create a button which will make the EA run when pressed regardless of any other circumstances

      e.g. when the button will be pressed, the EA will automatically take the last candle´s range and put the orders.

      I browsed the forum and found FxDreema´s & Miro´s answers on these links respectively. However, I tried to use them, but the blocks just wouldnt run even when I used the "Run Blocks" feature.

      https://fxdreema.com/forum/topic/4417/buttons/2

      https://fxdreema.com/forum/topic/6505/how-to-work-with-the-buttons

      Any ideas how I could do this?

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      I´ll test it again then! 🙂 Thank you for your help! I appreciate it heavily.

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      @fxdreema I highly appreciate your help 🙂 This is extremely close. The issue with this one is that it doesnt capture the range in a proper way (e.g. when the last range was 40 pips, it doesnt register it), but besides that it functions as it should. I see getting the EA to register the lenght of the last range (40 pips, 30 pips etc whatever it is) to be the hardest challenge.

      Also, I dont understand why the condition has adjustment of +8 pips.

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      Unfortunately, I ran into a dead end it seems once again. Well, only time will tell if this is possible.

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      Anybody else has any other ideas? Im struggling to understand where vish´s part interacts with the last range. I cant find it, but maybe I do not know where to look.

      posted in Questions & Answers
      B
      Boferer
    • RE: SL/TP Adjusting based on the last range

      @vish It seems to be correct at first sight, but there are some discrepancies upon further investigation. However, this is more or less it. I have attached a picture I made in paint for visual representation. Also, one the first buy stop is triggered, the sell stop should get deleted, but I think I know how to do that so it shouldnt represent any problem.

      https://imgur.com/a/4yfNuiS

      I noticed I made an error defining the stop loss! My apologies. I´ll try to tinker around with the properties to see if I can get it to work with this example vish

      Update: I tinkered around with the input 9 and managed to get the SL´s converge, but they converge above the opening price of the new candle for some reason. I guess I need to dive deeper into the definition of the variable.

      posted in Questions & Answers
      B
      Boferer
    • 1
    • 2
    • 1 / 2