EDIT - I think I've determined the cause of the problem, which is that my profit and stop conditions are for [0] bars ago, so when there is a large enough bar it hits my profit and/or stop condition while also meeting my criteria for an entry signal, the algo gets stuck in a loop and keeps entering and exiting the same trade repeatedly. If this is true, them I'm not sure why it ever stops rather than just being stuck in an infinite loop, maybe some kind of stop measure in the software prevents it from continuing on forever?
Is there some way I can limit the algo to have a maximum of one entry/exit per bar or something similar? I'll do some checking in the mean time.
Comment