Stop Loss Grid Part 2

A follow up to the earlier Stop Loss Grid post that fixes a code issue and reduces over trading.

This is a follow up to an earlier video on a grid trading strategy that included a stop out and claimed profit on a price pullback.

The strategy comes from Expert4x and the code was written to exactly match the strategy as described.

This follow up fixes some issues from the earlier code.

  • Take care of cases where the expert is to exit after reaching stop loss. This is a piece of code I mentioned in the first video that could be made more reliable.
  • Fix an overtrading issue from the strategy. Removes some trades that add no value.
  • Remove a no value hedged pair of trades. The original 2 trades when the grid opens have no value.
  • Fix an area where code is duplicated between long and short positions. The video was recorded to show minimum change from the original code when addressing the duplicate code problem but I can see that it could be better written if not based on the original.

To follow this video you will need the code and the Orchard Framework from the original video.

Original code: https://github.com/OrchardForexTutorials/220403_stop_loss_grid
Framework: https://github.com/OrchardForexTutorials/framework_3

If you have a suggestion or request for a future tutorial you can leave details in our Topic Requests forum or vote for existing requests. Make sure the requests are clear and if you refer to a strategy somewhere leave a link to the strategy

https://orchardforex.com/requests

2 Comments

Leave a Reply