Can someone please help me with this small request described on the first post above. Again I am trying to figure out how to extract my average open price based on my open trades.
I think you need to post your EA so that the other members can look at your code. The job should not be difficult, but it's impossible to say without seeing the code...
must be the way the markets are goign but 5k has been more then enough to keep it running and making profit everyday. It is still very early days but from what ive seen very impressive.
ZTrader: I think you need to post your EA so that the other members can look at your code. The job should not be difficult, but it's impossible to say without seeing the code...
ZTrader,
Why would you need the EA to figure out how to code average prices based on open orders?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can someone please help me with this small request described on the first post above. Again I am trying to figure out how to extract my average open price based on my open trades.
Thanks in advance,
TimeFreedom
I think you need to post your EA so that the other members can look at your code. The job should not be difficult, but it's impossible to say without seeing the code...
must be the way the markets are goign but 5k has been more then enough to keep it running and making profit everyday. It is still very early days but from what ive seen very impressive.
many thanks for the help,
I think you need to post your EA so that the other members can look at your code. The job should not be difficult, but it's impossible to say without seeing the code...
ZTrader,
Why would you need the EA to figure out how to code average prices based on open orders?
TimeFreedom
AveragePrice()
Hi TimeFreedom,
Please try this function:
{
int total = OrdersTotal();
double sum = 0;
for (int cnt = total-1 ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
sum = sum + OrderOpenPrice();
}
if (sum == 0) return (0);
else return (sum/total);
}
[/PHP]
Use it like this:
[PHP]double ap = AveragePrice(); // <-- The Average Price of all opend tradesHi TimeFreedom,
Please try this function:
{
int total = OrdersTotal();
double sum = 0;
for (int cnt = total-1 ; cnt >=0 ; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
sum = sum + OrderOpenPrice();
}
if (sum == 0) return (0);
else return (sum/total);
}
[/PHP]
Use it like this:
[PHP]double ap = AveragePrice(); // <-- The Average Price of all opend tradesCodersGuru,
Thanks for your quick responce. Hopefully I can give back to you somehow. Maybe we can work on a profitable system together sometime soon.
TimeFreedom
Price Cross
TrailingStop = 100 ?
TrailingStop = 100 ?
Default settings.
It means:
TrailingStop = 50;
Stop loss = 50;
Take Profit = 200
and so on ...
Ea Help...please!!!
This EA which I've been trying to modify to my trading style keeps opening double trades (one buy and one sell) on the same currency pair(s).
For the life of me I cannot figure out why or fix this EA to keep it from doing this. I only want one trade in one direction to be open at time.
Can anyone who is more experienced at programming please HELP me with this.
Thanks