Errors, bugs, questions - page 920

 
sergeev:
What is the expiry time ?

I have tried all variants ofBuyStop.

bool  BuyStop(
   double                volume,                       // объем позиции
   double                price,                        // цена исполнения
   const string          symbol=NULL,                  // символ
   double                sl=0.0,                       // цена Stop Loss
   double                tp=0.0,                       // цена Take Profit
   ENUM_ORDER_TYPE_TIME  type_time=ORDER_TIME_GTC,     // тип истечения
   datetime              expiration=0,                 // время истечения
   const string          comment=""                    // комментарий
   )
ENUM_ORDER_TYPE_TIME : ORDER_TIME_GTC, ORDER_TIME_DAY, ORDER_TIME_SPECIFIED, ORDER_TIME_SPECIFIED_DAY

In the default example:ORDER_TIME_GTC - The order will be in the queue until it is withdrawn
Itwassupposed to put a date 17/12/2012 23:50 (or 18/12/2012 23:50) forORDER_TIME_SPECIFIED - but it did not pass (data for 17/12/2012) .

Q1: Do you have possibility to test this function on RTS-3.13 ?

Q2: Which broker works with MT5 on futures other than Otkritie DB ?

There is a reason to believe that the broker has a "glitch". But nobody will admit it :)

Thank you.

 
Nikos52:
datetime DateExpiration = D'17.12.2012 23:59'; // 
...
if(!m_Trade..(1, price, Ticket)
 
It may be noted that in this version of the code, the DateExpiration variable is not used in any way as a parameter of the BuyStop method.
 
Yedelkin:
It may be noted that the DateExpiration variable is in no way used as a parameter of the BuyStop method in this variant of the code.

You're absolutely right ! :) It's just that this line

datetime DateExpiration = D'17.12.2012 23:59';

left over from the variant (which also has an error).

if (!m_Trade.BuyStop(1, Price, Ticket, StopLoss, TakeProfit, ORDER_TIME_SPECIFIED, DateExpiration))
       Print("Ошибка BuyStop"); 

I was going to delete that line from the post ... forgot :)
Sorry !

 
Nikos52:

You're absolutely right ! :) It's just that this line

left over from the variant (which also has an error).

I was going to delete that line from the post ... forgot :)
Sorry !

Looks like you've got your head all messed up.

Take simple Moving Averages without any OOP tricks and just open an order with standard OrderSend

 
Hello, I have this question - I bought an EA installed on my computer, then ordered a VPS server and installed the same EA. In the end I refused the rented server because the broker has a free service, but I cannot install the Expert Advisor for the third time (on three hardware). What can I do? Can I give up one server for another? Where to go? Thank you!
MQL5 Маркет
MQL5 Маркет
  • www.mql5.com
Маркет - магазин программ для MetaTrader 5 и MetaTrader 4
 
sergeev:

you seem to be confused to the max.

Take a normal Moving Averages without any OOP tricks and just open an order with the standard OrderSend

Ok. I'll make an example.
 
sergeev:

it seems you're confused as hell.

You may use a regular Moving Averages without any OOP and just open an order with the OrderSend

Dear Alexey!

I followed your advice and made an example without OOP. I.e. I haven't used CTrade class.
For my EA I used script from Automated Trading Language Documentation
.
The Expert Advisor code is in the attached file. If you have some time, please see it.

I have the same error 10022
, all kinds of pending orders:

ORDER_TYPE_BUY_LIMIT
ORDER_TYPE_SELL_LIMIT
ORDER_TYPE_BUY_STOP
ORDER_TYPE_SELL_STOP

I checked withORDER_TIME_SPECIFIED andORDER_TIME_GTC.

I have also made a short video (47 sec HD 720) as I have tested in the Strategy Tester

Broker promises to open real accounts from 4/02/13 and then ... "not the sleeve of a fur coat". :)

Files:
 

- Does the broker support setting an order with the time?

To do this, press F9 and check if the time can be set.

 


Some kind of glitch with the symbol/price

 
olyakish:


Some kind of glitch with the symbol/price

Details are needed.

What broker, what build, what were the actions?

Reason: