Cant do more than one trade - Pls help

 

Hi,

 

i am not able to buy/short more than one trade. My EA is based on RSi, my broker is oanda and it give me off quotes for the 2nd trade, i have more than 10k CAD with 1:40 magin. for the first trade i am trying to buy 1 lot i.e 100,000 and for the 2nd trade i am tring to buy 90,000 i.e. .9 lot. The pair i am trying to buy is EUR/USD.

 please find my code below. Plese help !!  I do get "Trade could not be completed due to  Insufficient Funds" in the Mailbox of MetaTrader software.

-------------------------------------------------------------------------------------------------------

 

 

if(RSInow < 30)
         {

            if (RSInow > RSIlast)
               {
                  Print("Entering Condition");
                  Print( "****");
                  Print("RSi now in Cond : "+ RSInow);
                  Print("RSI Last in Cond : " + RSIlast);
                  Print("Current Ask is : "+ Ask);

                   ticket=OrderSend(Symbol(),OP_BUY,lotsize,Ask,3,0,0,"My order no #2",magic,0,Green);
                  Print(" The ask post order is " + Ask);
                  Print(" The Point is  " + Point);
                   top=Ask+100*Point;
                   sop=Ask-250*Point;
                  Print("Top is "+ top);
 
                  flag=1;
              
               }


         } 

 if(flag==1)
   {
         if(RSInow > 30)
         {  
               if(flag2 ==0)
               {
                  Print("Second buy ");
                  Print("Current RSI is  " + RSInow);
                  Print("Current Ask is  " + Ask);
                  ticket2=OrderSend(Symbol(),OP_BUY,lot2,Ask,3,0,0,"My order no #2",magic2,0,green);
                  top2=Ask+100*Point;
                  sop2=Ask-250*Point;
                  flag2=1;
             }
         }
   }
 
ananduf:

Hi,

 

i am not able to buy/short more than one trade. My EA is based on RSi, my broker is oanda and it give me off quotes for the 2nd trade, i have more than 10k CAD with 1:40 magin. for the first trade i am trying to buy 1 lot i.e 100,000 and for the 2nd trade i am tring to buy 90,000 i.e. .9 lot. The pair i am trying to buy is EUR/USD.

 please find my code below. Plese help !!  I do get "Trade could not be completed due to  Insufficient Funds" in the Mailbox of MetaTrader software.

-------------------------------------------------------------------------------------------------------

 

 

You gave your answer to your question yourself allready...

See also Balance , Equity and free margin after you have done the first trade and try to do the second...

Reason: