Here is how it works:
- Firstly, we need to calculate a "Key Value" based on the current price of the currency pair. For quotes with 4 decimal places, the key value is the current price multiplied by 10 and then rounded. For quotes with 2 decimal places, the key value is the current price divided by 10 and the rounded.
- Place a pending Buy Order at Current Price + (2 * Key value).
- Place a pending Sell Order at Current Price - (2 * Key value).
- Place a stop-loss for pending Buy Order at Open Price - (2 * Key value).
- Place a stop-loss for pending Sell Order at Open Price + (2 * Key value).
- Take-profit for both orders is calculated similarly to the key value but the current price should be multiplied by 100 and then rounded.
- Place a Trailing Stop to both order at 2.5 * Key value.
- When one of the order get triggered, cancel the other untriggered order.
- The current price is 1.4810 and the current candle's open price is 1.4832.
- The price is quoted with 4 decimal places. Therefore, the "Key Value" is calculated as 1.4810 * 10 = 14.8. Rounding it results in 15 pips.
- Pending Buy Order is calculated as 1.4810 + (2 * 15) = 1.4840.
- Pending Sell Order is calculated as 1.4810 - (2 * 15) = 1.4780.
- Stop-loss for pending Buy Order is calculated as 1.4832 - (2 * 15) = 1.4802.
- Stop-loss for pending Sell Order is calculated as 1.4832 + (2 * 15) = 1.4862.
- Take-profit for both pending orders is calculated as 1.4810 * 100 = 148.1, which is
148 pips after rounding up. - Therefore, the Take-profit for pending Buy Order is set to 1.4840 + 148 = 1.4988.
The Take-profit for pending Sell Order is set to 1.4780 - 148 = 1.4632. - Finally, the Trailing Stop for both orders are set to 2.5 * 15 = 37.5, which is 38 pips after rounding up.
ليست هناك تعليقات:
إرسال تعليق