Weekend evening - page 66

 

Vladimir, Good morning!

You have once made a program that works with closing positions by funds, but it was so complex that in fact the work of this program is at a standstill.

Maybe you could make the Lite version of the program to close on means?

The way I see the Lite version is:

1. As soon as we loaded the Expert Advisor on the chart, it immediately counted the funds.

2) In the settings, we set only one parameter: this is profit ( by equity, of course) at achievement of which all positions for all symbols will be closed and all pending orders will be deleted.

3. After closing the positions the program will save new funds, and begin its work anew.

That's all you need from this program.


If possible, additional options for the convenience of the trader:

a) Show on the chart (permanently) recorded funds from which the program started .

b) To show the funds on the chart (on a permanent basis ) , when they are reached, all positions will be closed and all pending orders will be deleted.

c) Add a "Reset" button on the chart, when you press it, the recorded funds will be reset and a new reading will take place.

e) Only if it will be possible! - Separate positions into buy and sell if necessary. (I.e. when a predefined profit is reached, only buy positions will be closed, or only sell positions will be closed, or all of them together).

How it works:

As soon as we have loaded the program on the chart, it immediately reads the funds (the reset of the recorded funds occurs only in three cases:

1. deletion of the program from the chart

2. closing of all positions by the program itself (2.1 or complete absence of open positions, if possible)

3. Clicking the "Reset" button (on the chart) .

4. Preferably, the restart of the terminal would not affect the recorded funds.

Here are such thoughts)))!

 
Good afternoon Vladimir, Please look at the code, something does not pull up the orders https://www.mql5.com/ru/forum/330714#comment_27650726 A screenshot there attached.
Советники: Pending Trailing
Советники: Pending Trailing
  • 2020.01.17
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Советники: Pending Trailing
 

Hi, please see this code of yours too... very good as a pipsetter or better as a netminder...https://www.mql5.com/ru/code/37878

Forum on Trading, Automated Trading Systems & Strategy Testing

Expert Advisors: Separate Trade New

Sergey Kriushin, 2022.02.13 16:42

Hi, works great as pipsator, puts both up and down with small profit in couple of days makes 100%...but loses too, stays both up and down... I think it would make a great nettler with expiry time for both up and down orders - the grail would be 100% ... kindly ask: please do the same with the trailing stops... If I had set up to 20 positions, at first it would do almost everything, but there are candlesticks and long trends, so losses are piling up on them, so they would expire by expiry time ... If I wanted to make such pending orders last because they are the ones that don't work the most...


I've been putting such pending orders in, but they don't seem to work...

//--- устанавливаем ордера
   if(PositionsTotal()<1 && OrdersTotal()<1)
     {
      if(rsiVal[1]<RSILevel)
        {
         request.action = TRADE_ACTION_PENDING;
         request.symbol = _Symbol;
         request.volume = NormalizeDouble(Volume()/2,2);
         request.price=NormalizeDouble(Ask+60*_Point,_Digits);
         request.sl = NormalizeDouble(request.price - SL*_Point,_Digits);
         request.tp = NormalizeDouble(request.price + TP*_Point,_Digits);
         request.deviation=50;
         request.comment      = "AS-CH_BUY";                 
         request.type_time    = ORDER_TIME_SPECIFIED;         
         request.expiration = expiration;
         request.magic=m_magic;                
         request.type=ORDER_TYPE_BUY_STOP;
         request.type_filling=ORDER_FILLING_FOK;
         for(i=0;i<14;i++)
            {
             if(OrderCheck(request,check))
               {
                OrderSend(request,result);
                Print("Установлен ордер BuyStop");
               }
             Print(ResultRetcodeDescription(result.retcode));
            }        
        }

      if(rsiVal[1]<79-RSILevel)
        {
         request.action = TRADE_ACTION_PENDING;
         request.symbol = _Symbol;
         request.volume = NormalizeDouble(Volume()/1,2);
         request.price=NormalizeDouble(Bid-360*_Point,_Digits);
         request.sl = NormalizeDouble(request.price + SL*_Point,_Digits);
         request.tp = NormalizeDouble(request.price - TP*_Point,_Digits);
         request.deviation=50;
         request.comment      = "AS-CH_Sell";                 
         request.type_time    = ORDER_TIME_SPECIFIED;         
         request.expiration = expiration;         
         request.type=ORDER_TYPE_SELL_STOP;
         request.type_filling=ORDER_FILLING_FOK;
         for(i=0;i<12;i++)
            {
             if(OrderCheck(request,check))
               {
                OrderSend(request,result);
                Print("Установлен ордер SellStop");
               }
             Print(ResultRetcodeDescription(result.retcode));
            }                                
         }     
Separate Trade New
Separate Trade New
  • www.mql5.com
Стратегия на отдельных параметрах для BUY и SELL позиций (Стоп лосс, Тейк профит, iATR, iStdDev) и расстоянии между двумя iMA
 

Vladimir, could you please tell me how to set an overall no-loss Break Start - Break Step and implement an overall Trailing Stop - Trailing Step for all unidirectional positions regardless of their magic number.

Strangely enough I didn't expect any problems with this, I couldn't find such an Expert Advisor for this purpose. I did not find such an Expert Advisor in your EA either.

I have never found such an expert.

My respect.

 

Hello Vladimir, I have an idea for building a grid expert. the idea is as follows: let's call the expert "Grid Expert" conditionally

1. We enter a deal, no matter by which Expert Advisor or manually (but it is necessary to define a controlled deal in the Expert Advisor "Grid Expert Advisor"; otherwise it will build a new grid from each deal, which, in principle, can also be tested)

2. After we have entered into a transaction, the Expert Advisor "Se etochnik" determines its own transaction for a magik and begins to place new orders for (Buy Stop) for sell (Sell Stop) following the price at a distance of "Step".

3. Spread control for placing a new order (preferably a spread control for removing when expanding but this can also be done by a third party program)

4. Preferably, the work time.


In principle, everything is simple and standard, but what I have not found in the base of other EAs or missing is a combination of the following factors

First: they do not cling to trades made by third-party Expert Advisors,

Two: they don't control the spread.

Third: they do not place orders one by one (i.e. order after another).

I would also like to add the following: we can easily and comfortably control this grid visually, i.e. if necessary, move the order manually, it turns out to be a good assistant for manual trading.

Regards.

 

Vladimir Please make an expert like this: Everything is on the screenshot.

Clarification:

Step distance is set in EA settings by yourself.

If possible, it is desirable to control spread, if the spread is larger than specified an order will not be placed.

This is the indicator Gann High Low Activator EA on the basis of which you have made the Expert Advisor Gann High Low Activator EA

I need this EA very much!)))) If possible, please let me know what you have read and let me know what you have decided, but I need it very much!))) If possible, please help))) !!!!

Files:
1.1.1.jpg  264 kb
 
ai1111 EA settings by yourself.

If possible, it is desirable to control spread, if the spread is larger than specified an order will not be placed.

This is the indicator Gann High Low Activator EA on the basis of which you have made the Expert Advisor Gann High Low Activator EA

I need this EA very much!))) If possible, please let me know what you have read and let me know what you have decided, but I really need this EA)))) Help me out)) !!!!

It is not clear at what moment and by what algorithm the signal is searched and set.

 
Vladimir Karputov #:

It is not clear at what point and by what algorithm the signal is searched for and set.

You can use the Bars window indicator or an analogue to find the maximum and minimum for a certain number of bars.

Bars window
Bars window
  • www.mql5.com
Индикатор отображает прямоугольник от ... до ...
 
Vladimir Karputov #:

It is not clear at what point and by what algorithm the signal is searched for and set.

Good afternoon, Vladimir!!! Sorry for the long reply I have been doing other things all this time, even the computer where I work on forex and with you did not turn on once!!! I had to switch brains to unload) and help my mother and my car time to spare))))))).

 
Vladimir Karputov the expert settings by yourself.

б. If possible, it is desirable to control the spread, if the spread is more than the specified order will not be placed.

b. It is important (set only one direction, ie, only one order, which we have initially set) or it will always be only buy stop order, or only sell stop.


c). Use the Gann High Low Activator indicator, on the basis of which you have made the Gann High Low Activator EA.

e) if it is possible, take the Gann High Low Activator EA as a base , but instead of the first trade, it will place a pending order.

f) if possible, and only if possible: select the order type between Stop and Limit

Looking forward to hearing from you!

Bars window
Bars window
  • www.mql5.com
Индикатор отображает прямоугольник от ... до ...
Files:
1.1.1.jpg  264 kb
Reason: