..OnBarUpdate(){ int timeMin = MyFunc(); } protected int MyFunc(){ if(State==State.Historical){ return Time[0].Hour; } else{ return CurrentBar + Time[0].Minute+30; } }
(without sending them as arguments , like MyFunc(arg1,arg2 ...) )..
Shortly, I want to use different methods in OnBarUpdate, and those methods could access the all available variables of OnBarUpdate.
Comment