I current have 5 double variables, BELevel1, Level2, etc and 5 double BEPriceLevel1, PriceLevel2 etc. Once the trade is entered, I check if BELevel1 is 0, if not, I use that variable. If it is already used, I move on to BELevel2, etc. Once price moves to or beyond my Level, I reset that level back to 0. Also, if at anytime my position becomes flat, then I reset all the levels and start fresh.
I feel there should be a better way to keep track of this? maybe using a list, array or dictionary of some sort?
I have int counters, longEntryCount and shortEntryCount to keep track of unique entries in both directions, and am using them as apart of the long and short entry signals, but am unsure of a good way to use this together with my levels.
I want to be able to keep track of these in case I happen to take multiple trades in the same direction without the first hitting the trigger level.
Am I just overthinking this? What do most people do? I can't imagine everyone would only use I variable and only reuse it once the original trade has been closed.
Comment