MOEX.Beginner's Questions - page 14

 
Sergey Savinkin:
Try to trade in the REAL for 2 days, even if it is 1 contract manually, many questions will disappear on their own.
The demo won't have all the charms described above?
 
Renat Akhtyamov:
will the demo not have all the charms described above?

There is no clearing on the demo. Not always the right collateral is indicated correctly. It is not certain that the correct stack is available. Also, you can estimate the real speed of order execution. You won't lose much money on 1 contract. ))))

 
Sergey Savinkin:

There is no clearing on the demo. Not always the right collateral is indicated correctly. It is not certain that the correct stack is available. Also, you can estimate the real speed of order execution. You won't lose much money on 1 contract. ))))

I meant clearing?

Well, if there is no clearing in the demo, then I don't know how to test it yet.

 
Renat Akhtyamov:

I meant clearing?

Well, if not in the demo, then I don't know how to test it yet

Why do you need clearing for a test? Everything counts as real time. Clearing only confirms that everything is OK.
 
Yuriy Asaulenko:
Why do you need clearing for a test? All counts for real time. Clearing only confirms that everything is OK.

I forgive you ;)

I want to test the strategy in trading conditions as close to real as possible.

The point is that there are no "gifts" on the real.

 
Renat Akhtyamov:

I forgive you ;)

I want to test the strategy on trading conditions, as close as possible to real ones.

The point is that there are no "gifts" on the real.

There are always gifts on the real.

 
Alexey Kozitsyn:

There are always gifts in the real world.

You mean unexpected losses?
 
Renat Akhtyamov:
Do you mean unexpected losses?

Most of the time, yes, it is a loss. But not always. Personally, I don't always understand how a broker's commission is charged. A certain style of trading may charge a commission for the frequency of trading transactions. It may indeed be a loss if you don't watch the betting market + enter with a big lot. In general, there will always be peculiarities when you switch from tester/demo to real. And there will always be presents.

 
Hello, Can you advise me, I trade through MT5 on Forts, added monitoring *** to my account, but I have faced with the fact that *** does not correctly calculate the results of transactions, especially if the position is transferred through clearing, i.e. may not correctly calculate profit/loss in the money, or some transactions from the statment in the monitoring are absent. Maybe someone has a problem with this?
 
Вадим Мотеюнас:
Hello, Can you advise me, I trade through MT5 on Forts, added monitoring *** to my account, but I have faced with the fact that *** does not correctly calculate the results of transactions, especially if the position is transferred through clearing, i.e. may not correctly calculate profit/loss in the money, or some transactions from the statment in the monitoring are absent. Maybe someone has a problem with this?
//+------------------------------------------------------------------+
//| Expert Get position price function                               |
//+------------------------------------------------------------------+
double GetPositionPrice( const string aSymbol )
{
  double price_in = 0;
  double volume_in = 0;
  double price_out = 0;
  double volume_out = 0;
  double price = 0;
  double volume = 0;
//---  
  ulong pos_id = ulong( PositionGetInteger( POSITION_IDENTIFIER ) );
    
  if ( pos_id > 0 )
  {
      if ( HistorySelectByPosition( pos_id ) )
      {
        int deals = HistoryDealsTotal();
      
        for( int i = 0; i < deals; i++ )
        {
          ulong deal_ticket = HistoryDealGetTicket( i );
          ulong order_ticket = ulong( HistoryDealGetInteger( deal_ticket, DEAL_ORDER ) );
        
          if ( order_ticket > 0 )
          {
            ENUM_DEAL_ENTRY deal_entry = ENUM_DEAL_ENTRY( HistoryDealGetInteger( deal_ticket, DEAL_ENTRY ) );
              
            if ( deal_entry == DEAL_ENTRY_IN )
            {
              price = HistoryDealGetDouble( deal_ticket, DEAL_PRICE );
              volume = HistoryDealGetDouble( deal_ticket, DEAL_VOLUME );
                                
              price_in += price * volume;
              volume_in += volume;  
            }
            else
            if ( deal_entry == DEAL_ENTRY_OUT )
            {
              price = HistoryDealGetDouble( deal_ticket, DEAL_PRICE );
              volume = HistoryDealGetDouble( deal_ticket, DEAL_VOLUME );
                                
              price_out += price * volume;
              volume_out += volume;  
            }
          }
        }
//---  
        price = price_in - price_out;
        volume = volume_in - volume_out;
//---
        if ( volume > 0 )
        {       
          return( NormalizeDouble( price / volume, _Digits ) );
        }
      }
      else
      {
        Print( "GetPositionPrice: Невозможно получить историю позиции по символу ", aSymbol );
      }
    }
    else
    {
      Print( "GetPositionPrice: Невозможно определить идентификатор позиции по символу ", aSymbol );
    }
  return( 0 );
}