![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Remove the highlighted code
Thanks a lot Keith for your suggestion on my code.
I request please could you advise/guide/suggest on how to read profit part of indicator iExposure from any EA using iCustom() function. how to check for any errors when I am trying to read values from indicator with iCustom function.
when I am using below code to read values from indicator there were no errors. there is no out put as well
double pl=iCustom(NULL,0,"iExposureSymbol",Red,1,0);
below is the indicator code:
Many thanks in Advance
The indicator only uses 1 buffer, ExtMapBuffer[], and when I say use, it doesn't actually use it for anything.
just
So an iCustom call is no use at all with the indicator as it is.
checks buffer 1, when as there is only 1 buffer it would have to be 0. It still would be no use though as explained above.
Please use the code button when posting code. I will edit it for you this time.
The indicator only uses 1 buffer, ExtMapBuffer[], and when I say use, it doesn't actually use it for anything.
just
So an iCustom call is no use at all with the indicator as it is.
checks buffer 1, when as there is only 1 buffer it would have to be 0. It still would be no use though as explained above.
Please use the code button when posting code. I will edit it for you this time.
thanks for your advise Keith,
I have been trying to get the floating p/l from the attached EA. I tried many ways to get the currency wise floating pl from this EA. In my all afforts, OrderProfit() is not getting sum of more than 2 orders.
please could you help/suggest/guide/advise on how to get floating pl from this attached EA. Different types of code which I tried so far is working from other EAs but not from this attached EA
thanks for your advise Keith,
I have been trying to get the floating p/l from the attached EA. I tried many ways to get the currency wise floating pl from this EA. In my all afforts, OrderProfit() is not getting sum of more than 2 orders.
please could you help/suggest/guide/advise on how to get floating pl from this attached EA. Different types of code which I tried so far is working from other EAs but not from this attached EA
Your code is an indicator and would need to use the EA's magic number to filter trades.
The indicator only uses 1 buffer, ExtMapBuffer[], and when I say use, it doesn't actually use it for anything.
just
So an iCustom call is no use at all with the indicator as it is.
checks buffer 1, when as there is only 1 buffer it would have to be 0. It still would be no use though as explained above.
Please use the code button when posting code. I will edit it for you this time.
Hi,
I have written a small indicator script going through the documentation. please some one guide/advise/suggest/help me to modify this script to read floating profit/loss value from iCustom() function.
this indicator is displaying floating p/l on the chart
Your script "is displaying floating p/l on the chart." It is working. You don't modify it. It is done.
You write another indicator or EA to use iCustom to read the buffer.
Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum
Your script "is displaying floating p/l on the chart." It is working. You don't modify it. It is done.
You write another indicator or EA to use iCustom to read the buffer.
Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum
thanks for your reply whroeder1,
when I tried to access the p/l value from my ea using the below command it is displaying different results.
double pl = 0;
pl=iCustom(NULL,0,"profitind",0,0);
please advise;
thanks for extension of your help.
thanks for your reply whroeder1,
when I tried to access the p/l value from my ea using the below command it is displaying different results.
double pl = 0;
pl=iCustom(NULL,0,"profitind",0,0);
please advise;
thanks for extension of your help.
Hi,
Now I am able to read floating pl from my ea as below. here I am facing strange problem. when sum consists of more than 2 orders, it is not reflecting in my EA variable (sum). please some body help on this
double sum=0; sum=iCustom(_Symbol,0,"profitind","",0,0);
Hi,
Now I am able to read floating pl from my ea as below. here I am facing strange problem. when sum consists of more than 2 orders, it is not reflecting in my EA variable (sum). please some body help on this
double sum=0; sum=iCustom(_Symbol,0,"profitind","",0,0);