[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 507
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
Are there any MT4 accounts where you can open a lock with negative equity? I'm asking purely out of interest. The dispute arose on another forum. I am told that such accounts do exist! :DD
So that there are no unnecessary questions, here's an example:
You have opened one trade with volume N. Your terminal says after the line "Free:": "-XXX.XX"... Would you be able to open a lock with volume N!? I don't think so in a regular account... And I was told that there are some special accounts! :)))))) I don't believe it...
The answer is received... I'm shocked...
And I don't believe it! Is Uncle Kolya resting there?
It's normal if the account is in minus, all positions are forcibly closed. It is another matter if you managed to open a losing position before the minus, because the margin for the losing position does not increase, while you cannot even open a position in the same direction.
But it happens! And Uncle Kolya is not resting, he's ready to knock on the door! :D
And you are confused about something... When your free funds have just become less than zero, you will be forced to close the most unprofitable trade only if the StopOut is 100%. And at 50%, your free funds will be in the red for a long time! :)))
Are there any MT4 accounts where you can open a lock with negative equity? I'm asking purely out of interest. The dispute arose on another forum. I am told that such accounts do exist! :DD
So that there are no unnecessary questions, here's an example:
You have opened one trade with volume N. Your terminal says after the line "Free:": "-XXX.XX"... Will you be able to open a lock with volume N! I don't think so in a regular account. And I was told that there are some special accounts! :)))))) I don't believe it...
The answer is received... I'm shocked...
These "chefs" don't know how to lure "silly Pinocchio" anymore!
I only meet Kolya Morzhov in the tester. I put my restrictions in the Worker's Counsellor so as not to go to extremes! ;))
Hi folks! Where or how do I click to find out the maximum lot I can bet?
He has already asked in another thread about it. It was answered... But he doesn't understand the code - he wrote about it himself.
He wants a script (ready-made solution - press a key (run the script) - look at the screen).
r772ra, wow, I should pay more attention to kim functions, thanks!
He already asked in another thread about it. It was answered... But he doesn't understand code - he wrote about it himself.
It needs a script (ready-made solution - press a key (run the script) - look at the screen).
There is only one thing left, to invite him to invest our accounts! :))
There's only one thing left to do, invite him to invest our accounts! :))
It's a good idea, but difficult to implement
I'm getting a bit confused now. Here are 3 functions, each of which receives a specific signal for a specific indicator.
This function receives general signal from all indices and makes decision to BUY or SELL.
This is the main function that receives the general signal; here we get the values of indices through the loop to go through all the bars, of course... And then the obtained values are passed by reference to the appropriate functions where these values are needed, i.e. to the functions:
int GetCrossingMa(double& i_maFast1, double& i_maFast2, double& i_maSlow1, double& i_maSlow2)
int GetStochSignal(double& stochD1, double& stochD2, double& stochK1, double& stochK2)
void GetMomentumSignal() , in principle, can also be put there.
Thus, all the calculations of the indices will be in one main function of getting the signal. Everything is logical in this case...
Victor! You have the logic, but the knowledge is not so far enough. If you keep at it, the first will help you go further than the textbook, and to "conquer" the second, you have to start with it (the textbook). You are not ready (yet) to build your own logical code structure, go back to the alphabetical version.
P.S. What "catches the eye" in your code:
In the function GetSignal() for search of crossing of two lines the for loop MAY be used, but it is better to use while loop, although this is personal preference. To start with, you need to move a parenthesis like in "Execution cannot be pardoned" to make your code execute what you have just said. For some reason, this (result) function lacks results of two functions: GetStochSignal() and GetMomentumSignal() - this is slightly inconsequential.
in functions GetCrossingMa() and GetStochSignal() there is NO point in passing parameters by references, because it would make sense, if these variables inside the function CHANGE their values.
The void GetMomentumSignal() function returns NOTHING.
Although I admit that it's "worse to see" from the outside... :)))
Here is an alternative variant of the function that gets signals from MAsh(s):
As it can be understood from the comments, the signal can be obtained as a result of inclination of one МА (at MA_K_Period <= 1.0) or as a result of intersection of 2 МА (at MA_K_Period > 1.0). The period of the 2nd MA is calculated by itself (outside of this function):
You can also specify in the function the condition for divergence of 2 MAs (when fd_Deviation > 0.0). You can also track the fact of intersection (fb_ControlBeginChangeTrend = TRUE) or just fix the finding of Fast and Slow relative to each other.
To see how this code works, I placed an indicator in the archive that draws arrows by the signals of this function. We launch it using Signal_MA.tpl (for one MA) or Signal_MA2.tpl (for 2 MAs). By the way, the MAs can be of different types.
Here is an alternative variant of the function, which receives signals from MAs:
As we can see from the comments, the signal can be obtained based on inclination of one MA (at MA_K_Period <= 1.0) or based on intersection of 2 MA (at MA_K_Period > 1.0). The period of the 2nd MA is calculated by itself (outside of this function):
You can also specify in the function the condition for divergence of 2 MAs (when fd_Deviation > 0.0). You can also track the fact of intersection (fb_ControlBeginChangeTrend = TRUE) or just fix the finding of Fast and Slow relative to each other.
To see how this code works, I placed an indicator in the archive that draws arrows by signals of this function. By the way, the MAs may be different.
If you want to speed up the work of the indicator, please contact