fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. roar
    3. Posts
    • Profile
    • Following 0
    • Followers 184
    • Topics 35
    • Posts 2394
    • Best 420
    • Controversial 6
    • Groups 0

    Posts made by roar

    • RE: CLOSE BAR HELP!

      Did you do it like this:
      https://fxdreema.com/shared/1WVco5iZ

      posted in Bug Reports
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      I think the trade statistics always looks at the whole history, so you wouldn't be able to focus on some x number of history positions

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      I just realized the above is partial bullshit. Multiplying the profits doesnt work because we check it against average value. But its a start, at least

      Dividing the currentprofit should work

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      @timmyhanke
      So the question is, how to get the loss values from history positions.

      I would store the current profit, to some variable currentprofit

      Because you compare many trades to one trade, you need to multiply the currentprofit with the number of last trades before continuing - just use a formula. In the formula I would also multiply it with *-1, so it can be compared to a loss.

      Then use the "check profit (average)" block, set to look at x number (number_of_positions) of history positions, and compare the average last profit to the currentprofit

      https://fxdreema.com/shared/D382vaNlc

      This is just a fast mockup, how I would do it, perhaps there is a better way. To be honest, I haven't used anything like this, because I try to avoid making decisions based on profits and losses, and rather focus on actual price data.

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Yeah, that would work 😄

      posted in Questions & Answers
      roar
      roar
    • RE: Give my variables eternal life

      Yeah, I went with the global variables, but it feels a bit clumsy solution, and makes a really weird interference in my backtest.
      The file approach would be better, I guess its time to learn some actual MQL coding 😄

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      ^This is exactly why I like to help 😄

      If you need further help, I'm usually bored enough to assist 😄

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      I downloaded your .ex4 and added 111 pips SL, heres what I got:
      0_1500478180696_upload-5e1c9179-ece9-44a4-a922-7dc03e7f2b7b

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      It should work technically, but the logic is now so that there must be profit in order to make anything happen - otherwise the ea just waits and hopes the profit to show up 😄
      Try with an SL

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      I modified it to work with profit, which, I think, you wanted in the first place
      here: https://fxdreema.com/shared/c2mQcANde

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Mine works now, it closes trades when equity drops 10%...
      0_1500476938147_upload-015e1610-2eb0-44cc-9b6b-68517d5af53d

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Oh, sorry didn't know that 😄
      Yes, youre right

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      This method doesn't actually precisely answer to your question, because it works with account equity, not profit. But with some changes, the method can be applied to the profit, loss or anything you want

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      After closing the trades, you need to reset the maxprofit to 0 - otherwise the logic works only one time.
      Check how I did the resetting in https://fxdreema.com/shared/6FWqaYX2b
      Block #5

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Aaa, I found the problem!

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Ah, I use mt5 myself and comment works fine.

      No, the comment block is just for you, for debugging

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      In condition five, I set the Ratio to be lower than 0.9 - check your terminal that the value (inp4_value) really is 0.9. You can also try some different ratio value, maybe that helps.
      Does it close everything constantly, if you disable the whole variable block tree?

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Hmm, did you use the comment block, to view how the variables change?

      Care to share the project so I can check

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      Yes, thats how you set them up.
      You dont usually need to give them any values different than 0, because the ea updates them anyway

      And the names "maxprofit" and "Ratio" are just pulled from the hat, the code doesn't really care what you name them of course 😄

      posted in Questions & Answers
      roar
      roar
    • RE: Total profit reduces by x % then close everything.

      It's useful to see what the variables are at each moment - the comment block is for that

      posted in Questions & Answers
      roar
      roar
    • 1
    • 2
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 117 / 120