Exp Swing
- Experts
- Vladislav Andruschenko
- Version: 24.979
- Updated: 15 November 2024
It uses the model of a famous strategy called Swinger (Pendulum, Cheburashka) - alternate placing of pending orders with increased lot.
The strategy lies in placing two opposite pending orders. When the price moves in a certain direction, one pending order is triggered, while the lot size of the other order is increased.
The EA provides three types of opening pending orders (TypeofTrade)Auto-opening after placement (Instant opening AutoTrade)
Opening and management after manual opening (Manual opening ManualTrade)
Opening by Distance between High/Low levels (High Low for the past bar TFTrade)
An OCO (One-Cancels-the-Other) order is a type of conditional order that consists of two orders. The first order is automatically cancelled if the second order gets executed.
How it Works?
- At the start, the Expert Advisor places two orders - Buy Stop and Sell Stop on the distance StopOrderDeltaifUSE from the current price.
- If Buy Stop triggers, Sell Stop will be deleted and a Sell Stop order with the volume BuyStop * Martin will be placed instead.
- If Sell Stop triggers, Buy Stop will be deleted and a Buy Stop order with the volume SellStop * Martin will be placed instead.
- When take profit is reached, all the orders are deleted, and everything is repeated from the start!
To have the swing effect, the parameters StopOrderDeltaifUSE and StopLoss should be equal.
Note: there can be a situation when a broker opens an order and then closes it by a stop loss. In this case, every order will wait to be closed by take profit, and only after this the algorithm will start working from the beginning!
Do not test the EA by Open prices! Test it only on all ticks.
Parameters
Default values are shown in brackets.
- trade_ - Trade Settings section.
- TypeofTrade - select the EA trading mode.
- StopOrderDeltaifUSE - distance for pending orders (100).
- Magic - magic number (777).
- StopLoss - stop loss, not used by default (0).
- ModifyStopLossAtOrdersopen - change a deal's stop loss to a pending order Open level.
- TakeProfit - take profit, not used by default (0).
- StopDayTradingEaAfterTP - if the last position is closed by take profit, the EA stops working till the next day.
- MarketWatch - trade mode (false). If 'true, the EA will open orders/positions without stop levels, and then it will modify them. It suits when working with some brokers.
- Lots - a fixed started lot (0.1).
- timetrade_ - Trade Time section.
- OpenHour - opening hour of trading (0).
- CloseHour - closing hour of trading (23).
- TrailingStopUSE - use trailing stop (false).
- TrailingStop - trailing stop distance, minimum distance is used on default (0).
- TrailingStep - trailing step (1).
- StartPointToTrail - the level in points to start using trailing.
- RollbackPoint - the number of rollback points to close a part of the position.
- PercentLotToClose - percent of the initial volume to close a position.
- StepPointToFixLevel - the number of points to fix the next level.
- MovingInWLUSE - set the position to breakeven with the first level of the trailing stop.
LotFix - lots separated by commas to open orders, for example, "0.1,0.2,0.3,0.6,0.8,1"; Starting lot always = Lots. Subsequent orders can be written to the LotFix variable separated by commas.
Martin is the Martingale ratio for the next open order lot(Volume) after losing (2).Attention! Martingale works only at the value of Lots. If LotFix is set, martingale does not work.
MartinFix - The Martingale coefficient, separated by commas, for opening orders, for example, "2,3,1,5,2,1"; Attention! Martingale works only at the value of Lots. If LotFix is set, martingale does not work.
Vladon, Expforex
La testare programa lucreza foarte bine, a ramas de vazut in regim DEMO apoi regim REAL.