Furthermore, how do I set that variable for the current bar? For example, if I got "exitPrice = (HighestBar(High,3,0)" to work, and then attempt to use the same variable for an exit as in, "EnterLongStopMarket(Convert.ToInt32(DefaultValue) ,exitPrice, @"EnterLong");", the variable exitPrice that was set for bar[0] on bar close will not update until the next bar. It will use the previously assigned price of the variable until that bar closes.
So how can I update a variable OnBarClose and use it for that same bar?
Thank you,
Comment