Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 962
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
Hi Artyom,
Please let me know how I can get a 15 second or 30 second candle on the chart?
I have seen that the smallest chart time is PERIOD_M1. But I want to have a seconds chart. Can you please tell me how this can be done?
Hi Artyom,
Please let me know how I can get a 15 second or 30 second candle on the chart?
I have seen that the smallest chart time is PERIOD_M1. But I want to have a seconds chart. Can you please tell me how to do this?
If we are talking about MT5, you cannot.
if you want to draw a seconds chart in MT4, here I didhttps://www.mql5.com/ru/code/24839
Could you please advise how to write in your EA that the orders opened by the MA signal will be closed only by the reverse MA signal (or by one condition), and the orders opened by the RCI will be closed only by the RCI (by other conditions).
Here, for example, is the condition
if (MA>close[0])
ordersend....... BUY.....
if (RSI>70)
ordersend........ BUY....
-----------------------------
1) In this case, how do I close the first order according to one condition, and the second order according to another condition?
2) How to make the following:
..... а) no more than 1 order is opened (until the open one is closed)
.....b) so that each order is opened regardless of the presence of open orders (multi-strategy)
Thank you in advance.
Please, advise how to write in your EA that orders opened by MA signals should be closed only by reverse MA signal (or by one condition) and orders opened by RSI should be closed only by RSI (by other conditions).
Here is, for example, the condition
if (MA>close[0])
ordersend....... BUY.....
if (RSI>70)
ordersend........ BUY....
-----------------------------
1) In this case, how do I close the first order according to one condition, and the second order according to another condition?
2) How to make it so that:
.....a) no more than 1 order is opened (until the open order closes)
.....b) open each order independently of the open orders (multi-strategy)
Thank you in advance.
use 2 magic numbers and for each magic number perform order accounting and modifications
Can iHighest (iLowest) be applied to an indicator (e.g. MACD, RSI)?
copy the indicator buffer and apply ArrayMaximum ( ArrayMinimum )
but I think there will be a problem if the indicator uses EMPTY_VALUE
copy the indicator buffer and apply ArrayMaximum ( ArrayMinimum )
but I think there will be a problem if the indicator uses EMPTY_VALUE