Bid is only valid for the current chart symbol.
prices[i][2]=OrderSend(instrument[i],OP_SELL,portie,Bid,3,0,0);
- 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.
- Code it to trade the chart pair only. Look at the other's if you must.
- Then put it on other charts to trade the other pairs. Done.
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
WHRoeder:
- Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll, and usually other problems.
- Code it to trade the chart pair only. Look at the other's if you must.
- 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 ;-)
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
any idea why:
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.