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
Does anyone have an ea like this? I need one to close half of a position at x pips please
Regards, J
Please anybody have?
Please anybody have?
Select the order you wish to close (half of it) and add the following code :
double MinLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT) ,2);
double MaxLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MAXLOT) ,2);
double LotStep = NormalizeDouble(MarketInfo(Symbol(),MODE_LOTSTEP),2);
if (LotStep==1) LotDigit=0;
if (LotStep==0.1) LotDigit=1;
if (LotStep==0.01) LotDigit=2;
double Lots=NormalizeDouble(OrderLots()/2.0,LotDigit);
if (Lots<MinLots) Lots=MinLots;
if (Lots>MaxLots) Lots=MaxLots;then try to close "Lots" of that selected order
Select the order you wish to close (half of it) and add the following code :
double MinLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT) ,2);
double MaxLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MAXLOT) ,2);
double LotStep = NormalizeDouble(MarketInfo(Symbol(),MODE_LOTSTEP),2);
if (LotStep==1) LotDigit=0;
if (LotStep==0.1) LotDigit=1;
if (LotStep==0.01) LotDigit=2;
double Lots=NormalizeDouble(OrderLots()/2.0,LotDigit);
if (Lots<MinLots) Lots=MinLots;
if (Lots>MaxLots) Lots=MaxLots;apologies I have no coding knowledge of any kind can you make into an EA?
Regards, J