I ussualy using this to manage my EA daily, setting "first" for balance before start, "over" for target plus, and "under" for minimal equity reach.
How to change it to automatic, so i don't have to change it every day?
example : first = 200, over = 20, under = 20, reach the target 20 so next day input for "first" is 220 and "under" is up to 40, "over" is still the same 20.
here is my code before:
if (AccountEquity()>= (Over)+First ){
for(int TO=OrdersTotal()-1;TO>=0;TO--)
{
OrderSelect(TO,SELECT_BY_POS);
deleteOrder();
Sleep(86400000);// sleep for 1 day
return(0);
}} else
if (AccountEquity()<= (Under) ){
for(int eq=OrdersTotal()-1;eq>=0;eq--)
{
OrderSelect(eq,SELECT_BY_POS);
deleteOrder();
Sleep(86400000);// sleep for 1 day
return(0);
}} else {
Thanks for the help.
anyone, help needed.
Thank you
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I ussualy using this to manage my EA daily, setting "first" for balance before start, "over" for target plus, and "under" for minimal equity reach.
How to change it to automatic, so i don't have to change it every day?
example : first = 200, over = 20, under = 20, reach the target 20 so next day input for "first" is 220 and "under" is up to 40, "over" is still the same 20.
here is my code before:
if (AccountEquity()>= (Over)+First ){
for(int TO=OrdersTotal()-1;TO>=0;TO--)
{
OrderSelect(TO,SELECT_BY_POS);
deleteOrder();
Sleep(86400000);// sleep for 1 day
return(0);
}} else
if (AccountEquity()<= (Under) ){
for(int eq=OrdersTotal()-1;eq>=0;eq--)
{
OrderSelect(eq,SELECT_BY_POS);
deleteOrder();
Sleep(86400000);// sleep for 1 day
return(0);
}} else {
Thanks for the help.