Discussion of article "Step-by-Step Guide to Writing an Expert Advisor in MQL5 for Beginners" - page 18

 
Creating an Expert Advisor starts with selecting the input signal of any indicator. Whatif Ijust want toopen one pending stop or limitorder or two opposite stop orders or a grid of orders?! What and how to do?!Pleaseadviseme.
 
fenix74:
Creating an Expert Advisor starts with selecting the input signal of any indicator. Whatif Ijust want toopen one pending stop or limitorder or two opposite stop orders or a grid of orders?! What and how to do?!Please tell me.

Start small: use the MQL5 Wizard to create an Expert Advisor template (exactly a template, but not generation).

After that, you can move on (like in school: you get an assignment, show the completed lesson - get the next assignment).

 
Vladimir Karputov:

Start small: use the MQL5 Wizard to create an Expert Advisor template (exactly a template, but not a generation).

After that, you can move on (just like in school: you get an assignment, you show the lesson completed - you get the next assignment).

Thank you for your reply Vladimir,I am not a complete beginner, I can write asimple Expert Advisorin MQL4, the creation of an EA template is the same.Just because ofmy age,MQL4 was hard tolearn, and hereI need to master 5 fora long time. I wanted to convertExpert Advisors with orders and grids to 5quickly. I have tried to learn OOP, but so far I have not succeeded, there is not enough information and lessons for beginners.

 
fenix74:

Thanks for your reply Vladimir!I am not a complete beginner, I can write asimple Expert Advisorin MQL4 , they have the sametemplate creation .Just because ofmy age,MQL4 was hard tolearn, and hereI need to master 5.I wanted to convertExpert Advisors with orders and grids to 5quickly. I have tried to learn OOP, but so far I have not succeeded, there is not enough information and lessons for beginners.

iADX Grid

The idea of trading strategy Working WITHOUT Take Profit, Stop Loss and Trailing Stop. - Closing positions and deleting pending orders upon reaching Minimum Profit. We get trading signals from the indicator iADX (Average Directional Movement Index, ADX). The trading signal is built on the basis of the main filter and a qualifying signal. Main filter: ADX on bar # ADX: Current Bar is above the specified level ADX: Level Clarifying signal: '+DI ' rises above '-DI ' -> BUY signal '+DI ' falls below '-DI ' -> SELL signal By default ADX: Current Bar is equal to '0 ' and ADX: Level is equal to '40.0 ' Refinement of trade signal execution Execution of a trade signal based on the main filter and the refining signal implies absence of positions and automatic deletion of pending orders. Example: a signal to open a BUY position is received - this signal will be taken for execution only if there are no BUY or SELL positions opened by this Expert Advisor in the market. Before execution...

CodeBase | 2019.07.17 11:42 | Vladimir Karputov | Expert Advisors | MetaTrader 5

 
Artyom Trishkin:
That's not gonna help. I have a thread on my profile about it. There's a reason and a solution to the problem.
I don't understand about the trolls.

) A response from a real troll himself!

I looked in your profile. His /Answer/ is not there! Could a normal person like before your comment JUST indicate the solution to the problem, and not send as a TROLL somewhere where there is not even a direct link to the solution to this problem!!!!!.

 

Please insert a Parabolic instead of ADX indicator, and we will all be happy).

By running with visualisation in the tester this replacement is clearly suggested.

THANK YOU.

 
Tojlna:

) A response from the Real Troll himself!

I looked in your profile. His /Answer/ is not there! Could a normal person like before your comment JUST indicate the solution to the problem, and not send as a TROLL somewhere where there is not even a direct link to the solution to this problem!!!!!.

You and I did not drink on bruderschaft, and we are not friends. Do you think it is allowed to poke a person you don't know?

To JUST post you a solution to a problem, you should at least deserve respect and not be lazy. But I gave you direction, what is much more important is knowledge. After all, no one appreciates freebies.

And by the way, there's a direct link to the discussion in your profile:


And, yes, here (didn't look hard enough, then):

Типичные ошибки и способы их устранения при работе с торговым окружением
Типичные ошибки и способы их устранения при работе с торговым окружением
  • 2018.02.19
  • www.mql5.com
В данной теме будем обсуждать часто встречающиеся ошибки при работе с торговым окружением терминала в тех или иных алгоритмах, методы их устранения...
 

Hi, I'm getting an error:

return value of 'OrderSend'should be checked lines 213 and 259.


have you solved it?

 

The same thing happened to me. I managed to fix the problem.

In the line of the script my_first_ea.mq5, where it says

mrequest.type_filling = ORDER_FILLING_FOK; // Order execution type

I changed it to

mrequest.type_filling = ORDER_FILLING_IOK; // Order execution type

Cheers,


northedan:

Quando estou depurando sempre da erro na hora de enviar a ordem. Eu pensei que fosse meu código, mas mesmo testando o arquivo mql5 pra download da erro também.



 

Hi, I'm new, great guide, thank you!


I have a problem though. I compiled the provided example, ran through the debugger, the break points worked, resumed the debugging and I get 4756 errors on both buy and sell orders, like this:


The Buy order request could not be completed -error:4756
The Sell order request could not be completed -error:4756
...


What may be happening and what should I look into to correct this behaviour?


V.