
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 if make use of the monthly candle opening. every time new monthly candle created, then take the balance of that point. Will that works?
Hi,
please try my last post (yesterday 16:25) I have tested it and it works really fine in my environment.
Best regards,
Hi there,
i have changed the function for you and now it saves the date of the last update into the file:
I hope, this one works better for you.
Best regards,
I tried but it does not work, I think there is a problem in my code :-(
Hi Steeve,
the GetInitAccount() function returns the value of the Account on the first day of the month (orthe first day with a tick, when the first day is a Sunday) You should put the return value of the function
into a double variable and you can print the value like this:
It is not a good idea to call the GetInitAccount every tick, cause it costs a little bit of performance to
open the file and read it. You can use the isNewMonth function form William or you can call the function
only, when you open an order.
Second point: At the calculaton of the lot-size you use the AccountBalance() function, whitch
returns the current balance and not the Balane at the first day of the month.
Lots=(((AccountBalance() * MaximumRisk / 100) / (StopLoss)));
Instead of this you could use the GetInitAccount function like this:
Lots=(((GetInitAccount() * MaximumRisk / 100) / (StopLoss)));
I hope, this will help you ...
Best regards,
Hi Steeve,
the GetInitAccount() function returns the value of the Account on the first day of the month (orthe first day with a tick, when the first day is a Sunday) You should put the return value of the function
into a double variable and you can print the value like this:
It is not a good idea to call the GetInitAccount every tick, cause it costs a little bit of performance to
open the file and read it. You can use the isNewMonth function form William or you can call the function
only, when you open an order.
Second point: At the calculaton of the lot-size you use the AccountBalance() function, whitch
returns the current balance and not the Balane at the first day of the month.
Instead of this you could use the GetInitAccount function like this:
I hope, this will help you ...
Best regards,
Lots=(((GetInitAccount() * MaximumRisk / 100) / (StopLoss)));
if the "GetInitAccount()" function is called at here, wouldn't it also run this function quite frequently?
Hi Steeve,
in this case the "GetInitAccount()" function is only called before you open an order and that
shouldn't be as often as every tick?
Best regards
Hi Steeve,
in this case the "GetInitAccount()" function is only called before you open an order and that
shouldn't be as often as every tick?
Best regards
thanks
Hi Steeve,
the GetInitAccount() function returns the value of the Account on the first day of the month (orthe first day with a tick, when the first day is a Sunday) You should put the return value of the function
into a double variable and you can print the value like this:
It is not a good idea to call the GetInitAccount every tick, cause it costs a little bit of performance to
open the file and read it. You can use the isNewMonth function form William or you can call the function
only, when you open an order.
Second point: At the calculaton of the lot-size you use the AccountBalance() function, whitch
returns the current balance and not the Balane at the first day of the month.
Instead of this you could use the GetInitAccount function like this:
I hope, this will help you ...
Best regards,
Thanks so much sir It works very well now
Hi Steeve,
the GetInitAccount() function returns the value of the Account on the first day of the month (orthe first day with a tick, when the first day is a Sunday) You should put the return value of the function
into a double variable and you can print the value like this:
It is not a good idea to call the GetInitAccount every tick, cause it costs a little bit of performance to
open the file and read it. You can use the isNewMonth function form William or you can call the function
only, when you open an order.
Second point: At the calculaton of the lot-size you use the AccountBalance() function, whitch
returns the current balance and not the Balane at the first day of the month.
Instead of this you could use the GetInitAccount function like this:
I hope, this will help you ...
Best regards,
It works well sir but when I backtest on JANUARY, it can not get the current balance