I was wondering if something like this could work. Can you assign a value to something with 'if' 'else'? So in the code I used = and if else with each other, could this work?
void OnTick()
{
int UMA = if (close>open)
{high-close};
else
{high-open};
int LMA = if (close>open)
{low-open};
else
{low-close};
int UMA1 = if (close>open)
{close+UMAX};
else
{open+UMAX};
int LMA1 = if (close>open)
{open+LMAX};
else
{close+LMAX};
//---
}