Idea by: Scriptor
Code by: barabashkakvn
The LBS EA is a versatile tool designed for both netting and hedging accounts. It strategically places pending orders as soon as a new bar appears on the chart.
How It Works
This EA operates by comparing the current hour with three specified parameters: Hour 1, Hour 2, and Hour 3. If the current hour matches any of these parameters, it allows the placement of pending orders.
To determine the Buy stop price, the EA identifies the maximum and minimum prices between the first two bars on the chart. It then adds the value of the iATR indicator to the maximum price of bar #0. Conversely, the Sell stop price is calculated by subtracting the iATR value from the minimum price of bar #0.

When it comes to setting your trade volume, you have two options: you can choose a fixed lot size by selecting Money Management to Constant Lot or opt for a risk percentage per trade by selecting Risk in Percent for a Deal.
Once one of the pending orders is triggered (detected via the OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD transaction type), all remaining pending orders will be automatically removed.
Additionally, trailing stops can be applied to the positions, helping to maximize profits while minimizing risk.
Comments 0