I keep studying about MQL5 programming and its codes have served as an inspiration and base of studies, I have learned a lot, but sometimes I get a little lost and I can't understand exactly what certain codes do and why they are there ...
I was able to understand the whole code of "Hedge any positions", just a part of the code that I am having difficulty understanding what it does and why it is there, could help me understand what it is about and why it was added to the code?
I keep studying about MQL5 programming and its codes have served as an inspiration and base of studies, I have learned a lot, but sometimes I get a little lost and I can't understand exactly what certain codes do and why they are there ...
I was able to understand the whole code of "Hedge any positions", just a part of the code that I am having difficulty understanding what it does and why it is there, could help me understand what it is about and why it was added to the code?
I didn't understand why "freeze_level" and "stop_level" are checked, why in case they return the value "0" does the calculation (Ask-Bid) * 3 occur? And when the value "0" does not return, does multiplication by 1.1 occur?
What are these "freeze_level" and "stop_level" about?
I looked in the documentation and I didn't really understand their purpose and why this check and multiplication is done in cases of "0" return or not.
Before any product is published in the Market, it must undergo compulsory preliminary checks, as a small error in the expert or indicator logic can cause losses on the trading account. That is why we have developed a series of basic checks to ensure the required quality level of the Market products. If any errors are identified by the Market...
Good afternoon my friend...
I keep studying about MQL5 programming and its codes have served as an inspiration and base of studies, I have learned a lot, but sometimes I get a little lost and I can't understand exactly what certain codes do and why they are there ...
I was able to understand the whole code of "Hedge any positions", just a part of the code that I am having difficulty understanding what it does and why it is there, could help me understand what it is about and why it was added to the code?
Good afternoon my friend...
I keep studying about MQL5 programming and its codes have served as an inspiration and base of studies, I have learned a lot, but sometimes I get a little lost and I can't understand exactly what certain codes do and why they are there ...
I was able to understand the whole code of "Hedge any positions", just a part of the code that I am having difficulty understanding what it does and why it is there, could help me understand what it is about and why it was added to the code?
What exactly is not clear?
What exactly is not clear?
I didn't understand why "freeze_level" and "stop_level" are checked, why in case they return the value "0" does the calculation (Ask-Bid) * 3 occur? And when the value "0" does not return, does multiplication by 1.1 occur?
What are these "freeze_level" and "stop_level" about?
I looked in the documentation and I didn't really understand their purpose and why this check and multiplication is done in cases of "0" return or not.
I didn't understand why "freeze_level" and "stop_level" are checked, ***
Why check: read The checks a trading robot must pass before publication in the Market
***why in case they return the value "0" does the calculation (Ask-Bid) * 3 occur? ***
Elementary protection: '0' can mean floating level. In such cases, it is customary to multiply by '3'.
My new Expert Advisors use a modified approach:
Why check: read The checks a trading robot must pass before publication in the Market
Elementary protection: '0' can mean floating level. In such cases, it is customary to multiply by '3'.
My new Expert Advisors use a modified approach:
Thanks for the reply, I read all the documentation you sent me and made some changes to the code:
Do you think this is a good approach to update (and check for updates) quotes and configuration for a trade?
Thanks for the reply, I read all the documentation you sent me and made some changes to the code:
Do you think this is a good approach to update (and check for updates) quotes and configuration for a trade?
These are the lines:
m_trade.SetDeviationInPoints(0); m_trade.SetTypeFillingBySymbol(m_symbol.Name()); m_trade.SetMarginMode();once you need to register in OnInit.
You have set zero slippage - be prepared for the fact that you will receive a rejection very often
One question, what happens when the lot coefficient is less than 1, for example 0.5?
A position with a smaller volume will be opened.