Errors, bugs, questions - page 3077

 
Help solve the problem with the indicator. There is an indicator installed on two PCs. After I changed my trading account indicator was not displayed on the chart (1 pc), I changed timeframe and the indicator was lost (2 pc). All I have done is to download/uninstall indicator, compile and reinstall terminal. No result.
 
Ilyas #:
Wait for the next build, I can't give you the exact number, that information is not available to me at the moment.

Thank you.

It was supported by build 3031.

 
What does this log entry mean?
2021.09.02 04:14:56.118 Broker  TradeServer-Live: no demo/preliminary groups on server side
2021.09.02 04:15:15.774 Network '12345': authorization on TradeServer-Live failed (Invalid account)
 
Good afternoon ladies and/or gentlemen!

I have a proposal, I have already presented it before, so I thought I would remind you again.

The gist of it is simple, I propose to consider the idea of MetaEditor, that is, to add a very necessary and useful feature related to the source code editor, namely to add regions. For example, you could collapse a code fragment and mark the region with comments and colour.

I understand that bookmarks and #include are great too, but regions especially when large listings and a bunch of settings for each currency would be very helpful.

Thanks. All the best and success to all!
 

There is an order but the function does not see it. In this code, the order is selected by the function

OrderSelect

If it does not exist, it is searched through the history.

HistoryOrderSelect
 if(!OrderSelect(tic))
     {
      Error = GetLastError();
       ResetLastError();
      if(Error ==4754)
        {
         if(HistoryOrderSelect(tic))
           {
            statusOrder = HistoryOrderGetInteger(tic,ORDER_STATE);

            if(statusOrder==ORDER_STATE_FILLED)
              {
               int position_ID = HistoryOrderGetInteger(tic,ORDER_POSITION_ID);
                       }
           }
        }

But the function does not find the order when it has not yet triggered and finds it in the history with the status

The order is completely fulfilled

Ticket = 9. What is wrong? Screenshots of debug and order. yf ytz

 
Igor Petrov #:

There is an order but the function does not see it. In this code, the order is selected by the function

If it does not exist, it is searched through the history.

But the function does not find the order when it has not yet triggered and finds it in the history with the status

The order is completely fulfilled

Ticket = 9. What is wrong? Screenshots of debug and order.

Run the EA - it will print the number of pending orders and positions in the market. Exactly in the market, not in the trading history.

 

BarsCalculated()https://www.mql5.com/ru/docs/series/barscalculated

what does it return? - is it just the number that the indicator returned in return(rates_total) after the calculation in OnCalculate() is finished ?

 
Igor Makanu #:

BarsCalculated()https://www.mql5.com/ru/docs/series/barscalculated

what does it return? - is it just a number which was returned by the indicator in return(rates_total) after the calculations in OnCalculate()?

As I understand it is used in case of recalculation of the indicator by the TF other than the current one. And for the current TF, BarsCalculated() == prev_calculated

 
Vladimir Karputov #:

Run the EA - it will print out the number of pending orders and positions in the market. Exactly in the market, not in the trading history.


I don't understand, do you mean run it on a demo? I see that this EA searches for orders and positions in the market. What I meant was the debugger. When I launch the code using the debugger I see that order number 9 is in the market and it is visible in the Trade tab. Sorry for the blurred screenshot, but below there is a open tab called "TRADING". It means that the order is in the market. But in the code we can see in the EXAMPLE (variable statusOrder) that the order is fully executed (may be, I do not understand the status correctly) with ticket 9

ORDER_STATE_FILLED

Order completely filled

 
Igor Petrov #:

By running the code with the debugger I can see that order number 9 is in the market as seen in the trade tab.

The visualizer is not always synchronized with the trading environment. It may show old information. The actual information is always in the EA.

This is a very common issue, when the Expert Advisor says one thing, but the Visualizer shows something else.

Reason: