I am away from my trader computer but I assure you I have showed all the code in the main section after OnBarUpdate, of course the variables are above that section.
As for the reseting of some variables, I am referring to the upScore and the downScore...(and the ok2Trade from 1 to 0 after an order fires) since I only want one entry per "signal." After the long order is entered, for example, I change the upScore to "1" and the downScore to "0"...visa versa for a Short trade) that way after the next bar updates, since the upScore=1, the code won't show another opportunity for a trade ...early on without the upScore and downScore variables, the indicator code in Beta00 was showing an order entry opportunity after every bar that met the trade conditions...and the strategy code herein to enter an order mirrors the indicator code, that's why I want to "read" the ok2Trade variable from Beta00 and not manage it manually.
Please realize I am not asking for you, or anyone, to write the code, just show me my mistakes (or fill the gaps in my understanding). As I stated earlier, I want to understand the code because when I trade it LIVE, I am responsible, no one else.
So, before the end of the day, I am going to post the entire code, variables, everything, right on down to the last " } "and/or I can upload the indicator. Yes, I will strip out the "sauce" but I will make sure what I include is code that compiles and will launch an order. And, just to restate, the code at present will launch an order and cancel an order, but that it...no second order and/or no second cancellation. If I removed and reloaded the strategy after each trade opportunity it would work--but that's 10 to 15 times in a 3 hour period...kind of defeats the purpose and increases the odds of making a mistake.
You will find I am most willing to learn and will comply with any reasonable requests--and you have been most reasonable and patient. Thank you. Stay tuned.
Comment