I have figured out how to place extra bool values to flag my entry without putting an actual order in. I have done this to allow myself to enter on a pullback without having to use a limit order and all that other logic. It is working perfectly when I get the pullback. And will exit as it supposed to. I did see if I have it exit, I cannot keep the entry signal alive and it will look for another signal once that is closed. When I exited I tried to keep the Trade_Ready_Long = true but I assume it would not work. If there is a way to simulate it being in the position, that would be helpful as well. Here is what I am dealing with as a simplified system:
Lets say I want to enter on a moving average cross, I enter on the 5 crossing the 20. Now if I exit at lets say 20 pts for profit and 20 pts for stop it would ignore all other crosses until one of those two situations would happen. Now lets say I moved that profit target to 1 point for example, now I could get many crosses after I just exited for profit which could be good or bad. I want to keep the bool value live until my internal codes say its no longer valid, even if I want to have it do other things inside of that. For instance, lets say I got a pullback of 10 points from my Longentryprice which I save the value for on my trades, if we get back to even and I have it exit, I would want to be able to enter again on that same signal if we got a 10 point pullback if none of the internal code signaled.
Trade_Ready_Long = true once I get my entry signal.
I then set 2 other bools to true: intrade and longtrade. This locks in extra things for my logic used.
Then when I get my pullback it signals a Trade_Long_Entered bool
In the respective sections for EnterLong(); and ExitLong(); can I add soemthing else that holds a fake market position?
Once the signal is no longer valid it would reset all these variables to be ready for the next trade. I have had these types of variables working on other systems I have created but this pullback entry is different from what I have done before.
Now if not submitting an order is there a way simulate a position with another variable without entering? So, if one of my exit conditions hit before I get the pullback for my entry it will allow another entry signal?
I know I have asked the same thing a few times in this post but tried to explain in differently incase anyone can follow what I trying to do.
Any help is appreciated!

Comment