I am trying to do some backtest with strategy analyzer. My idea is to enter and exit position based on indicator values - my indicator has two values: lower and upper boundry (these boundries do not change during the session).
When data series gets below lower boundry and than start raising I want to enter with long position, which I managed this way:
- condition: Close[0] < lower boundry
- do: EnterLongStop(DefaultQuantity, lower boundry,"long_position")
Once I enter such position I do not want to sell it until price reaches upper boundry, but this I cannot accomplish in Strategy builder. I tried:
- condition: currentMarketPosition == Long
- do: ExitLongStop(DefaultQuantity, upper boundry, "exit_long_position")
But this does not work. When I tried just "Exit Long Position" Strategy Analyzer did exit the position on next bar. Any other type of exittin Long position was unsuccesfull.
See atteched picture - it should enter twice for long, but instead the first long expired on close of session.
Thank for answer
Comment