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
Dear Vladimir,
I put modify pending code at OnChartEvent...
They're very responsive.
Fine! Good decision.
Working with the CiDEMA class
The code
Result
Pic. 1. Working with the CiDEMA class
Get Stop Loss and Take Profit for a position from the trading history
The code:
Step 1: cycle to zero
Step 2: Finding the first deal NOT 'DEAL_ENTRY_IN' and remember the date
This approach saves memory - the next time we will request the trading history from this saved date.
Get Stop Loss and Take Profit for a position from the trading history
The code:
Step 1: cycle to zero
Step 2: Finding the first deal NOT 'DEAL_ENTRY_IN' and remember the date
This approach saves memory - the next time we will request the trading history from this saved date.
dear Vladimir,
How to get last lot from last position (opened by EA with magic number) that has been closed partiallly ?
dear Vladimir,
How to get last lot from last position (opened by EA with magic number) that has been closed partiallly ?
You missed a lot of details: what type of trading account, how part of the position was closed...
I recommend using the History Deals and Orders script (version 1.007 is available ONLY from the Russian part of CodeBase) - this way you will understand in which direction to move.
How to use a custom indicator in an EA
Code: 'iCustom AMA smoothed RSI (fl) value on chart.mq5'
Let's take a custom indicator here: AMA smoothed RSI - floating levels.
ATTENTION: the indicator must be placed in the [data folder]\MQL5\Indicators\AMA smoothed RSI (fl).mq5 folder and then the indicator must be compiled (button in MetaEditor)!
Example: class CLabel, Panel
Code: 'CLabel Panel Example.mq5'
This is an example of a panel on which an object of the CLabel class is created. The 'ASK' price is displayed on each tick in the object.
Result:
Full or partial closure
Code: 'Full or partial closure.mq5'
The code looks for positions by the given symbol (' Close positions 'Symbol ') and by the given Magic (' Close positions 'Magic number' '). Two work options:
The code does not have any protections and checks - if the position cannot be closed, an error message will be printed.
hi Vladimir I added macd feature to my robot. but it is not working. no eror. The feature I want is to close the position if the difference between the macd line and the signal line is 0.05. My robot is attached. can you check it? thanks