Partial Close EA - page 2 12 New comment [Deleted] 2015.06.21 12:09 #11 Does anyone have an ea like this? I need one to close half of a position at x pips please Regards, J [Deleted] 2015.06.22 12:39 #12 Please anybody have? Mladen Rakic 2015.06.22 12:53 #13 justin7:Please anybody have? Select the order you wish to close (half of it) and add the following code : int LotDigit = 0; 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 Dynamic Lots Need help with coding Error 130 - invalid [Deleted] 2015.06.24 07:50 #14 mladen:Select the order you wish to close (half of it) and add the following code : int LotDigit = 0; 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 apologies I have no coding knowledge of any kind can you make into an EA? Regards, J 12 New comment
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