Weekend evening - page 43

 
Vladimir Karputov:


Hello Vladimir!

Please help me to solve the problem.

I apologise in advance for creating a branch. https://www.mql5.com/ru/forum/322264

Трал и Стоп MQL5. Help.
Трал и Стоп MQL5. Help.
  • 2019.09.14
  • www.mql5.com
Помогите пожалуйста с тралом и стопом. Работает только для 1 позиции. Что может быть не так...
 
EA's idea:
Find market contraction by fractals (on last 15-20 bars).
Fr1_up<Fr2_up && Fr1_down1>Fr2_down.
Then connect any oscillator:
DeMarker<0.5 sell
EA's work on bar opening
 
forex_neforex:

Hello Vladimir!

Please help me to solve the problem.

I apologise in advance for creating a branch. https://www.mql5.com/ru/forum/322264

As long as you call the position a "warrant" I can't help you with anything. Unfortunately.
 
Vladimir Baskakov:
EA's idea:
Find market contraction by fractals (on last 15-20 bars).
Fr1_up<Fr2_up && Fr1_down1>Fr2_down.
Then connect any oscillator:
DeMarker>0.5 buy
DeMarker<0.5 sell
EA's work on bar opening
Sorry, on interest. Contact the Flirance service.
 
Aleksandr Klapatyuk:

I've been working all day and haven't been able to do anything.

I don't really know where to dig. the script: - The name of the object is sticky to the current price.

I remember and will try to answer tonight or tomorrow.
 
Vladimir Karputov:
I remember and will try to answer tonight or tomorrow.

Thank you! have a good weekend.

 
Vladimir Karputov:
As long as you call the position a "warrant" I can't help you. I'm sorry to say.

Excuse me. I hope you have time to help.

 
Aleksandr Klapatyuk:

Hello Vladimir, could you please tell me if this can be implemented in an indicator or in an Expert Advisor ?
I would like an object with the name to move behind the price.


Moves two objects - horizontal lines

Trailing Objects

Files:
 
Vladimir Karputov:

Moves two objects - horizontal lines

Thank you very much! Vladimir, good luck to you and your families!

Added your function to the Expert Advisor and to your Trade command.mq5

input string   t8="------ NAME Open ------";          //
input string   InpHLineBUY          = "(- ВНИЗУ -)";  // Name open buy (- ВНИЗУ -)
input string   InpHLineSELL         = "(- ВВЕРХУ -)"; // Name open sell (- ВВЕРХУ -)
input bool     InpReverse01         = false;          // Reverse Open - переворот торгового сигнала
input string   short_name           = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input string   t9="------ NAME Close ------";         //
input string   InpHLineCloseBUY     = "(- ВНИЗУ -)";  // Name Close buy (- ВНИЗУ -)
input string   InpHLineCloseSELL    = "(- ВВЕРХУ -)"; // Name Close sell (- ВВЕРХУ -)
input bool     InpReverse10         = false;          // Reverse Close - переворот торгового сигнала
input string   short_name0          = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input bool     Inpres               = false;          // Delete All Indicators
input string   t10="------ Trailing Obj:Line ------"; //
input string   InpObjDownName       = "(- ВНИЗУ -)";  // Obj: Follows the price up (Horizontal Line)
input string   InpObjUpName         = "(- ВВЕРХУ -)"; // Obj: Follows the price down (Horizontal Line)
input ushort   InpObjTrailingStop   = 15;             // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStep   = 5;              // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
//+------------------------------------------------------------------+
 

Multicurrency EA on one order only with stop loss and take profit.

Description of VPBB advisor for MT5 netting accounts without hedging.

1.1 Expert Advisor simultaneously trades symbols from the Simbols parameter (e.g. EURUSD, GBPUSD and USDCHF). The Expert Advisor is placed on the chart of one Simbols instrument (e.g. EURUSD) on a Time Frame (e.g. H1).
1.2 Example of a signal to open a position. If after the closing of a candle in the Time Frame, the opening price of the current day instrument from Simbols (e.g. EURUSD) is higher than its maximum VP for the previous day (there may be several maximum VP: the longest segment/s);

...

4. At Close Position Time "23:00" after 23:00 of the current day (including the following days), use a market order to close a position if there is a profit in pips higher than the Close Position Time Profit (e.g. 10). At Close Position Time "00:00" the function is disabled.
5. At Max DD "75" all trades are closed when the drawdown level (difference between Equity and Balance) reaches 75% after the M1 candle closes. At Max DD "0" the function is disabled.
6.1 At Deposit "50", the deposit size in the account currency is $50, for which the Lots position volume (e.g. 0.01 lots). Increase the volume of Lots by 100% in case the balance increases more than 100%: if Deposit "50" and Lots "0,01", then the step of increase of the position volume is 0,01 lot; if Deposit "500" and Lots "0,1", then the step of increase of the position volume is 0,1 lot and so on. If your account balance is less than the Deposit specified, this is not a limitation for trading (for example, if Deposit is "50" and Lots are "0.01", while your account balance is $30, you should start trading with a volume not less than the specified Lots, i.e. 0.01 lot). With Deposit "0" the function is disabled.
6.2 With Deposit "M1", it is allowed to increase Lots volume by 100% with more than 100% increase of balance after every minute and following conditions according to point 9.1. You can specify a total of 21 time periods (from M1 to MN - standard for MT5). For example, with Step Deposit "MN" the Lots volume may be increased by 100% with more than 100% increase in the balance after the beginning of a new month and under the conditions described in p. 9.1.
7. The VP, BB and Fractals indicators default parameters as shown in the screenshots (do not put them in external parameters). Integrate VP in the Expert Advisor's code during compilation. The signals for opening and closing positions, setting limit orders, stop loss, take profit, etc. must be executed without fail. The Expert Advisor should automatically handle currency pairs with any suffixes (e.g. ".1", etc.) and any order execution methods.
8. To perform work on "restoring" the work of the Expert Advisor after various failures (disappearance of the EA from the chart, disappearance of the chart with the EA, hang-up of the terminal or computer, connection failure, power outage, etc.) So that after any failure the copy of the Expert Advisor with the same settings can be set on a new chart and the Expert Advisor "recognized" its position and continued working with it.
9. Open Code of the Expert Advisor. The Expert Advisor logs in the Experts and Log tab in English. Free Margin Counter to open a trade. The current version of EA 1.0.

List of external parameters of advisor with settings for example (keep the order of variables).

1. timeFrame - H1
2. Simbols - EURUSD,GBPUSD,USDCHF
3. Deposit - 50
4. Lots - 0,01
5. OpenPendingOrders - true.
6. LimitSignals - 2.
7. LimitPositionsDay - 1.
8. VirtStopLoss - 10.
9. VirtTakeProfit - 100
10. TakeProfit - 150
11. TakeProfitNextDay - 20
12. TakeProfitNextDayTime - 00:15
13. ClosePositionTime - 23:00
14. ClosePositionTimeProfit - 10
15. MaxDD - 75
16. StepDeposit - MN
17. Deviation - 25
18. OrderID - 12345

Files:
1.png  58 kb