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
Posts made by roar
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
I modified it to work with profit, which, I think, you wanted in the first place
here: https://fxdreema.com/shared/c2mQcANde -
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Mine works now, it closes trades when equity drops 10%...

-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Oh, sorry didn't know that

Yes, youre right -
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
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
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
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 -
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Aaa, I found the problem!
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Ah, I use mt5 myself and comment works fine.
No, the comment block is just for you, for debugging
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
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? -
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Hmm, did you use the comment block, to view how the variables change?
Care to share the project so I can check
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Yes, thats how you set them up.
You dont usually need to give them any values different than 0, because the ea updates them anywayAnd the names "maxprofit" and "Ratio" are just pulled from the hat, the code doesn't really care what you name them of course

-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
It's useful to see what the variables are at each moment - the comment block is for that
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
Haha, okay, I see

Wait a moment, I'll build them.
Variables are some values, like constants, that store numbers
Formula is just basic calculating, plus minus multiply divide
I also avoided using variables for years because I didn't want to understand them

-
RE: Several open positions and several different take profitsposted in Questions & Answers
You using mt5 or mt4.
I think mt5 has only one stop-loss, but you can always set an opposing order: when you buy at lower BB, open a sell limit order at BB midline or anywhere you want the "take-profit"
-
RE: Re: Testing pass stopped due to a critical error in the EAposted in Bug Reports
Check the mt5 journal tab, it should tell which line of the code fails. Then find the corresponding fxdreema block with the metaeditor
-
RE: Scalpingposted in Questions & Answers
Theres a block, "check last closed position profit" or something
-
Give my variables eternal lifeposted in Questions & Answers
My ea collects info from the chart for several hours before making a trade.
The problem is, when I (accidentally) close the terminal, all variables disappear and the ea would start at 0.What is the best way to store the variables somewhere, so the newly started ea could load the previous variable values?
-
RE: Total profit reduces by x % then close everything.posted in Questions & Answers
I would play with some variable:
Variable maxprofit:
condition: equity > maxprofit -> modify variable maxprofit to same as current equityif equity < maxprofit -> calculate the ratio with formula equity/maxprofit
if formula result is, lets say lower than 0.9 (thats 10% decrease) -> close positions
You then should reset the maxprofit to 0, to not mess up calculations in future
I hope you get what I mean

-
RE: ea stop making orders at 162000$posted in Questions & Answers
You have to be more specific on the logic, mate.
Share your ea link perhaps?