@fxDreema so I made a tweak to logic which is the current price block to Candle ID 1 which worked but for a while everything seemed to reset itself back to ID 0 . https://fxdreema.com/shared/ZUcGXfH1c
The primary logic is that there should be a martinagle layering at the minimum distance of 80pips for example in this case and only valid at the close of Candle ID 1... if a candle closes and the minimum distance is not met yet, no trade position should open...The distance is a minimum requirement at the close of the current candle not a equal distance logic.