I just want to store a value when a particular condition is met, and be able to recall that specific value later in the script (to exit a position)...i tried myDataSeries.Set, but was not able to store the value. please help

example:
double value1 = ATR(100)[0]*500;
If a condition is met
{
store the value1
EnterLong("");
}
if (Close[0] >= value1 + 100)
{
ExitLong("");
}

Comment