need help creating Equity condition
-
trying to create an EA that will close all open trades when Equity has increased or decreased by a certain percentage of the balance. i can find Equity under the account section but no way to adjust it by percentage. appreciate any tips. thanks
-
Use this only as a guideline to understand how to approach this problem.
- The formula block calculates part of the percentage equation. is its a loss then it will give a negative value.
- the condition block left side will have the equity variable and at the bottom it is adjusted to (*100) multiply by 100 to give you a percentage. still the value will be negative is it's a loss,,,
- that's why in the condition block i had it set to equity variable (less than) -10 due to the negative value of a loss.
if you want a positive value, then you may need to create another formula that multiplies by -1
This is how I do things. maybe someone has a simpler idea.

-
Thanks q8, your reply reminds me of why people like me pay people like you to make indi's and EA's.

i definitely appreciate the advice though and will dig into it and see what i can come up with. Have a good'n. -
HA! i actually found something that works. probably not the most efficient method and will probably fail when i need it most but it's working for now. i was trying to find the "pass" tab that was in your pic and stumbled on these so i owe you one thanks again.!

-
You're welcome. It seems your way is way simpler than mine. as you can see there are many approaches to every situation. It seems I over complicate things
