[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 832
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
What's going to change next time?
What we need is for the sell signal to be received on bar D (situation 2 on the chart) to not close the order opened on bar A , and not to be affected in any way.
I.e., the orders are not controlled by the Expert Advisor after they are opened.
Thank you in advance.
Please help me attach a piece of Sequent Demarque code to the EA https://www.mql5.com/ru/code/7372
does not work like this:
num=0:
for(i=bars; i>=0; i--)
{
if ((iClose(NULL,PERIOD_M5,i+1)<iClose(NULL,PERIOD_M5,i+4) && num!=0 )) {
num++;
if ((iClose(NULL,PERIOD_M5,i+1)<iClose(NULL,PERIOD_M5,i+4))
buy.......
if (num==9)
close........
1. Count the number of orders of the first type
2. Count the number of type 2 orders
3. Compare the results
Dear Vinin. Thank you very much!
Here is the question. Let us assume that the buy signal in the EA will be displayed when the indicator (for example, I took CCI) crosses some level (red line) from bottom to top and the sell signal, respectively, when it is from top to bottom. How should we make the order open only once during the formation of the bar A? Suppose the indicator crosses the level (the red line) downwards and upwards several times during the formation of bar A. As I have already mentioned, we should make it so that an order is opened only once.
This requires that at a sell signal to be received on bar D (situation 2 on the chart) the order opened on bar A should not be closed and should not be affected in any way.
That is, the orders are not controlled by the EA after they are opened.
Many thanks in advance.
Actually, the CCI jumps so wildly that we'd better check it after the bar has closed and a new one has been opened.
If we want to check if the opening time of a candle is different (if it is, the order opens) or is the same (=> no order opens), then at each crossing we should store the opening time in the global variable.
Here is the question. Suppose, for example, our EA shows a buy signal when the indicator (for example, I took CCI) crosses some level (the red line) from bottom to top, and a sell signal when it, respectively, goes down. How should we make the order open only once during the formation of the bar A? Suppose the indicator crosses the level (the red line) downwards and upwards several times during the formation of bar A. As I have already mentioned, we should make it so that the order is opened only once.
What we need is for the sell signal to be received on bar D (situation 2 on the chart) to not close the order opened on bar A , and not to be affected in any way.
I.e., the orders are not controlled by the Expert Advisor after they are opened.
Thank you in advance.
Elementary EA, should open a position when Parabolic SAR indicator changes relative to price chart, works on M15, SL and TP are always constant for opened position.
The EA compares indicator positions of the current and previous candlesticks.
There are no errors or bugs during compilation, in the test in the tab "results" "chart" "report" is empty, in the log is this: "picture".
I am coding for the second day, i have never coded before, i read my mql books and searched the internet for my problem. I am at a deadlock, please help if you can.
T.H.C. try this
T.H.C. Try this.
Thank you so much, I didn't expect such a quick response and such a change in the code.
Please advise on programming books other than basic mql
Thank you very much, I did not expect such speed and changes in the code.
Please advise more books on programming, besides basic mql.