Discussion of article "Timeseries in DoEasy library (part 39): Library-based indicators - preparing data and timeseries events" - page 2
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello - in reviewing the event-handler code more closely, I noticed that you use different methods to parse out the source of the event... in some cases it's based on the chart event id parameter from OnChartEvent()while in others you extract it from the lparam parameter via engine.EventSource(lparam) -- is there a particular reason why it is different in each case?
Hi Artyom - can you clarify this for me, please?
Please, a little later - very busy for now
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
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 very much
Большое спасибо
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
Thank you very much
Jewel
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
Thank you very much
Jewel
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:
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.
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:
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.