Automatic manage?

 

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.

 
kieruwin wrote >>

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

Reason: