You are probably dealing with a market execution broker(I don't use IBFX, so I am not sure). That means that you can only enter a stoploss & takeprofit AFTER they return a trade to you. This is simply because you do not know what price you will recieve from them......with market execution your slippage is unlimited.....you takes what you get.
As an en exercise try replacing your ordersend with this 'priceless' order........
int ticket = OrderSend(Symbol(),OP_BUY,1.0,0,0,0,0,'Order #1',1234,0,Red);
It still comes back with a price, meaning that asking price & slippage are ignored. The reason for this is simple, it is not used by the broker at all.....as I said, you take what you get. The reason it still exists is because metaquotes could not remove it from the code without causing massive incompatibilities with our instant execution bokers.
That said, I always still use the correct bid and ask prices for backwards compatibility with the instant execution brokers.
As far as normalising prices go, people tend to go overboard with this......stops do not need to be need to be normalised but I do it anyway as a good practice. When you have a problem caused by unnormalised doubles and price, you will get an error 129 which is invalid price rather than error 130 which is an incorrectly calculated stop. I don't think I have seen an error 129 since I gave up the instant execution brokers.
In terms of your 5 digit broker, you should use Point*10 since the code does not care about the 5 digits.....it simply has recalculated your stops as 5 pips instead of 50 pips. It is good practice to define your pips sizes in the init() function of your EA, so you would have variable 'Pip' declared at the start(global scope) of the EA and then assign it a value in your init() function like this :-
Pip = Point * 10;
Then when you want to turn your 'human pip' stops into 'computer pips' you simply say :-
I do mainly asian scalping and I have found that the filtered price feed from instant execution brokers don't work so well. Maybe that has changed in the last year or so but I have found a couple of market execution brokers that work well and I have never felt the need to look back.
The price feed from STP/ECN brokers tend to be more 'raw' and scalpers like this. If you have any doubts about the levels of filtering, have a look at what happens to price feeds at rollover time(5pm EST) and you will get the picture. Compare that with a broker like Jade where you can experience rollover spikes of up to 160 pips(EURCHF once). MB Trading actually disconnect for up to 10 minutes over this period which used to piss me off no end until I eventually understood that this is in my best interest.
Anyway, bottomline is that the spikiness is the benefit and the rollover spikes are the risk. You don't get either at an instant execution broker and nor do you get the profits.
HIGH RISK WARNING: Foreign exchange trading carries a high level of risk that may not be suitable for all investors.
Leverage creates additional risk and loss exposure. Before you decide to trade foreign exchange, carefully consider your investment objectives, experience level, and risk tolerance.
You could lose some or all of your initial investment. Do not invest money that you cannot afford to lose. Educate yourself on the risks associated with foreign exchange trading, and seek advice from an independent financial or tax advisor if you have any questions.
Any data and information is provided 'as is' solely for informational purposes, and is not intended for trading purposes or advice.
Past performance is not indicative of future results.