-If it was 1st june, I will get the equity on that day.
I want to do a variable lotsize calculation based on the equity at the start of each month.
Think of a "High" but instead of scanning a bar, it searches the account history. Based on some of the searched posts, it seems there is no way to do this.
The popular option as I understand it is to scan the account history. But this raises a few question:
Is writing the data into an external file the only option I have in order to achieve what I want to do? I have no issues reading up if I know where the article is. But I don't... and I'm not a programmer. I never was until about 3 weeks ago. A lot of the discussion in the searched posts are very difficult for me to understand. Plus it doesn't address the issue that I have.
1.How do you set the account history to a custom date automatically (without human intervention). I can't find any documentation on this.
2.How do you check account equity on that particular day. You can check parameters like open time, sl, or even profit/loss. But you can't check equity.
you need to find each order (OrdersTotal and OrdersHistoryTotal) that was\is open at that date and time (start of the month) and calculate how much the profit was
and I'm not a programmer
The answer really depends upon your programming skills which you don't have much. The easiest solution would be using GlobalVariableSet() -its about the same effect as writing to file-. Every 1st of the month you save the equity at that time.
If you want to know the Balance (not equity) on 1st of the month without having that value saved then use WHRoeder's method posted in the link provided by qjol.
If you want to know the actual Equity then try searching on methods for calculating MAE/MFE. A little more involved and the results might be an estimate.
I've decided to forgo full automation and make things partially automated. Most of the solutions recommended are somewhat way above my level of understanding plus it's a lot of effort for something that doesn't get the job done as expected.
So I'm just going to add an "extern int" that I can use to set my account equity. Spending 5 manual mins a month isn't too bad of a solution at all.
Plus it only needs 1 extra line of code. Definitely a much more elegant solution.
To add comments, please log in or register