JPY issues

Back to topics list To post a new topic, please log in or register
avatar
63
Route206 2015.06.25 16:11
 

any idea why:

         prices[i][2]=OrderSend(instrument[i],OP_SELL,portie,Bid,3,0,0);
         if(prices[i][2]!=-1)
            {
            Alert("short : ",instrument[i]);
            }
            else
               {
               Alert("Error on ",instrument[i]," error_code: ",GetLastError());
               }

alsways works, except for any JPY pairs which give me error 

4107

ERR_INVALID_PRICE_PARAM

Invalid price

 

so weird and I don't know where to start looking - anything else besides JPY works fine. A broader slippage doesn't work either.

really puzzled. 

avatar
Moderator
3206
angevoyageur 2015.06.25 19:04 #
 
Bid is only valid for the current chart symbol.
avatar
12998
WHRoeder 2015.06.25 19:57 #
 
 prices[i][2]=OrderSend(instrument[i],OP_SELL,portie,Bid,3,0,0);
  1. Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
  2. Code it to trade the chart pair only. Look at the other's if you must.
  3. Then put it on other charts to trade the other pairs. Done.
avatar
63
Route206 2015.06.25 19:59 #
 

Good catch - should have known that! ;-)

I guess the below will work a lot better then! 

         prices[i][2]=OrderSend(instrument[i],OP_SELL,portie,MarketInfo(instrument[i],MODE_BID),3,0,0);
         if(prices[i][2]!=-1)
            {
            Alert("short : ",instrument[i]);
            }
            else
               {
               Alert("Error on ",instrument[i]," error_code: ",GetLastError());
               }

thanks 

avatar
63
Route206 2015.06.25 20:02 #
 
WHRoeder:
  1. Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll, and usually other problems.
  2. Code it to trade the chart pair only. Look at the other's if you must.
  3. Then put it on other charts to trade the other pairs. Done.

i'm sure that is the better approach - this is one however is where we're testing a basket and it behavior relative to others and eachother. 

As such, it serves a purpose ;-) 

Back to topics list  

To add comments, please log in or register