Discussion of article "Timeseries in DoEasy library (part 39): Library-based indicators - preparing data and timeseries events" - page 2

 

Hi Artyom,

In your example, pending orders worked but market orders did not work in visual backtest mode

Please help, thank you very much

Jewel

 
jewelnguyen :

Hi Artyom,

In your example, pending orders worked but market orders did not work in visual backtest mode

Please help, thank you very much

Jewel

I checked it - it works. Positions are opened in the tester. And they close too.

Write in more detail what you are doing.

 
Thank you for the quick reply,
I record the screen using an application available on windows 7
2 pending orders are working, 2 buy and sell orders are not responding

Thank you very much



Files:
Screenshot_1.jpg  123 kb
Screenshot_2.jpg  132 kb
Screenshot_3.jpg  127 kb
Screenshot_4.jpg  130 kb
screen.zip  340 kb
 
jewelnguyen :
Спасибо за быстрый ответ,
Я записываю экран с помощью приложения, доступного в Windows 7
2 отложенных ордера работают, 2 ордера на покупку и продажу не отвечают

Большое спасибо



What is written in the "Journal" tab?

 

Everything is working:


 

I'm just like you, why doesn't it work? Do you try on mt4 or mt5? I try on mt5, here you:

2021.04.11 14:29:21.646 2017.01.02 09:01:18   failed market sell 0.1 GBPUSD sl: 1.23561 tp: 1.23261 [Unsupported filling mode]

2021.04.11 14:29:21.646 2017.01.02 09:01:18   Trading attempt #2. Error : Invalid order filling type


I need it to test my manual strategy, please help me


Thank you very much

Jewel

PS: I tried on mt4 working very well, but on mt5 it got the same error as above
Files:
Screenshot_1.jpg  337 kb
 
jewelnguyen :

I'm just like you, why doesn't it work? Do you try on mt4 or mt5? I try on mt5, here you:

2021.04.11 14:29:21.646 2017.01.02 09:01:18   failed market sell 0.1 GBPUSD sl: 1.23561 tp: 1.23261 [Unsupported filling mode]

2021.04.11 14:29:21.646 2017.01.02 09:01:18   Trading attempt #2. Error : Invalid order filling type


I need it to test my manual strategy, please help me


Thank you very much

Jewel

PS: I tried on mt4 working very well, but on mt5 it got the same error as above

You need to set the correct order execution policy yourself (ENUM_ORDER_TYPE_FILLING). Use for this in the OnInit () handler:

...
...
...
 //--- 
   engine.TradingSetTypeFilling(ORDER_FILLING_XXX);
   return (INIT_SUCCEEDED);
  }
 //+------------------------------------------------------------------+

There are only three possible values:

  • ORDER_FILLING_FOK - This filling policy means that an order can be filled only in the specified amount. If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers available on the market at the moment.

  • ORDER_FILLING_IOC - This mode means that a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the entire volume of an order cannot be filled, the available volume of it will be filled, and the remaining volume will be canceled.

  • ORDER_FILLING_RETURN - This policy is used only for market orders (ORDER_TYPE_BUY and ORDER_TYPE_SELL), limit and stop limit orders (ORDER_TYPE_BUY_LIMIT, ORDER_TYPE_SELL_LIMIT, ORDER_TYPE_LIMIT_STYPELL) In case of partial filling a market or limit order with remaining volume is not canceled but processed further.
    For the activation of the ORDER_TYPE_BUY_STOP_LIMIT and ORDER_TYPE_SELL_STOP_LIMIT orders, a corresponding limit order ORDER_TYPE_BUY_LIMIT / ORDER_TYPE_SELL_LIMIT with the ORDER_FILLING_RETURN execution type is created.
 
Artyom Trishkin:

You need to set the correct order execution policy yourself (ENUM_ORDER_TYPE_FILLING). Use for this in the OnInit () handler:

There are only three possible values:

  • ORDER_FILLING_FOK - This filling policy means that an order can be filled only in the specified amount. If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers available on the market at the moment.

  • ORDER_FILLING_IOC - This mode means that a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the entire volume of an order cannot be filled, the available volume of it will be filled, and the remaining volume will be canceled.

  • ORDER_FILLING_RETURN - This policy is used only for market orders (ORDER_TYPE_BUY and ORDER_TYPE_SELL), limit and stop limit orders (ORDER_TYPE_BUY_LIMIT, ORDER_TYPE_SELL_LIMIT, ORDER_TYPE_LIMIT_STYPELL) In case of partial filling a market or limit order with remaining volume is not canceled but processed further.
    For the activation of the ORDER_TYPE_BUY_STOP_LIMIT and ORDER_TYPE_SELL_STOP_LIMIT orders, a corresponding limit order ORDER_TYPE_BUY_LIMIT / ORDER_TYPE_SELL_LIMIT with the ORDER_FILLING_RETURN execution type is created.
OK, thank you very much
 
jewelnguyen :
OK, thank you very much

Please report the results

Reason: