[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 616
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
I think you're right... I have my doubts too...
You can use this method to monitor equity in order to close all positions and delete orders as soon as the specified percentage of equity profit is reached:
I wrote it on the spot, so there may be errors.
To track changes in equity on every bar, just check for the opening of a new bar and if so, you should execute this code fragment:
I think it goes something like this...
Naturally, you are right. The implication was that you already have a code to take readings only once per bar.
I am interested in the reversal of Equity from increasing to decreasing, provided that Equity is above balance... to close everything that is open...
Here is the function for defining a new bar:
... interested in the reversal of equity from rising to falling as long as equity is above balance... to close anything that is open...
Then we need to check equity on every tick. After all, if you work on ticks, for example, one hour before the next equity check, equity may lose its value...
So, we should not compare the increase in equity by 1%, but its increase or decrease relative to the status on the previous tick, recorded in the Equ-OLD variable with its current value in Equ_NEW
interested in the reversal of the equity from rising to falling, provided the equity is above the balance... to close everything open...
Somewhere like this:
However, this is just information to think about, not ready-made code...
Sure. Only it's not called a stop, it's called a pending order. Open a terminal. Press F1 in it. In the window that appears open Contents - Trade - Order Types.
)))) thank you, but after funds confused/unaccustomed execution by bid and ask instead of trade, when something is confused - not shy to ask a stupid question to remove doubts. )))
Help . the dealer has five decimal places . iOpen (NULL,0,n) function gives only four decimal places (readings are taken via print) . how to solve the problem .
Help . the dealer has five decimal places . iOpen(NULL,0,n) function gives only four decimal places (readings are taken via print) . how do I solve the problem . thank you in advance.
Print() rounds up to 4 digits to correctly output to the console the type double(which returns iOpen() 5 decimal places, in this case), you should use DoubleToStr() function
string DoubleToStr( double value, int digits)
Converts a numeric value to a text string containing a character representation of a number in the specified precision format.
Parameters:
value - Величина с плавающей точкой.
digits - Формат точности, число цифр после десятичной точки (0-8).
I'm interested in equity reversal from ascending to descending, provided the equity is higher than the balance... to close everything open...
And here's an example of how it works... I deliberately made a position opening on each new bar... So, here we have "OC Killer"... :)
Enclosed tester report, where there is no limiters and opening of positions at every tick - huge percentage ... And no drawdown :) It's a pity nobody will let you work like this ...
Here is a picture of the report:
I've made lots of money with these "raids", with almost no drawdowns. I even did not manage to get to takeovers (you can see them at the top):