i'm trying to figure out how to save a value once a condition occurs, but the problem is that my condition becomes true each time newer data is loaded under OBU. I am only interest in the first instance.
for example
a= profit of instrument 1
b = profit of instrument 2
condition = if a+b > 100
{
closes[1][0];
Closes[2][0];
}
but since a+b > 100 multiple times. the closes that i am trying to retrieve change. Ideally, i am only interest in the First time the condition becomes true, then save the closes of those instruments. I want to use those closes to set a stoploss.
Comment