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
Fine. Now what should I do to get more or less 100pips. Is there any formula to calculate Spread?
Fine. Now what should I do to get more or less 100pips. Is there any formula to calculate Spread?
About your initial post :
I think this has a small mistake, I'm not sure...
Like I said before, with an OP_SELL, you open at the bid price, then close at the ask price...so if the TP is bid - 100, your profit will be 100 pips minus the spread.
Also, any TP that is based on the Bid and Ask at time of opening assumes that the spread is constant. I've done a lot of research on it recently and the spread is never completely constant. This won't show up in backtesting because MT4 doesn't save the Ask price (I think?? Does it use close price + current spread???), but you need to consider the real world too.
I think this has a small mistake, I'm not sure...
Like I said before, with an OP_SELL, you open at the bid price, then close at the ask price...so if the TP is bid - 100, your profit will be 100 pips minus the spread.
Also, any TP that is based on the Bid and Ask at time of opening assumes that the spread is constant. I've done a lot of research on it recently and the spread is never completely constant. This won't show up in backtesting because MT4 doesn't save the Ask price (I think?? Does it use close price + current spread???), but you need to consider the real world too.
make it open first the trade then modify it using its orderopenprice( ) will make it work on all accounts
make it open first the trade then modify it using its orderopenprice( ) will make it work on all accounts
No, this is still not right.
for short orders, the spread is taken when the order is CLOSED, not before, so using OrderOpenPrice still gives a profit of: 100 pips minus spread at time of closing.
Getting a TP of 100 pips for long orders is easy.
For short orders, you have to make the TP as OrderOpenPrice + 100 pips + spread
(and hope that the spread is near constant).
I think this has a small mistake, I'm not sure...
Like I said before, with an OP_SELL, you open at the bid price, then close at the ask price...so if the TP is bid - 100, your profit will be 100 pips minus the spread.
Also, any TP that is based on the Bid and Ask at time of opening assumes that the spread is constant. I've done a lot of research on it recently and the spread is never completely constant. This won't show up in backtesting because MT4 doesn't save the Ask price (I think?? Does it use close price + current spread???), but you need to consider the real world too.
Floating spread or not, this remains true.
BUT
You are right about spread is never completely constant, you have to check it and choose a broker who provides what he promised (check it).
make it open first the trade then modify it using its orderopenprice( ) will make it work on all accounts
I'm still a noob so excuse me if I've been wrong all this time. But I was certain that for a short order, the TP was triggered when the BID price reaches the TP level, but the trade is closed using ASK price.... it's the weekend now so I can't test but really..... is this not the case? Do TP's get triggered by ASK price on short trades and BID price on long trades? And if so, what happens in backtesting when ASK prices aren't available?
As for spread, I wrote a tick collector which then plots various broker's spreads on one chart for comparison. I've found some of them are exactly constant except when news is released, but some of them have quite variable spreads... some of them even look like the Ask price is delayed by about 100ms (i.e. spread is too big when price suddenly falls, and too small when price suddenly rises)....
Floating spread or not, this remains true.
Nope, this isn't correct. Take a hypothetical example where a trade is opened and then immediately closed, the loss is due to the spread. Using your calculation above for the SELL Profit = Open price - Close price = BID_OPEN - BID_OPEN + 0 = 0. but this is not the correct answer because the Spread has to be paid.
It should be this . . . Profit = Open price - Close price = BID_OPEN - ASK_OPEN + 0 = -Spread. . . . . but this assumes that the Spread is the same from the open time to the close time.
I'm still a noob so excuse me if I've been wrong all this time. But I was certain that for a short order, the TP was triggered when the BID price reaches the TP level, but the trade is closed using ASK price.... it's the weekend now so I can't test but really..... is this not the case? Do TP's use ASK price on short trades and BID price on long trades? And if so, what happens in backtesting when ASK prices aren't available?
Don't worry, we have all to pass by this stage, test it again and again, it's the best way to learn. What is closing a SELL trade ? It's a BUY! So this BUY is taken at ask price, which ask price ? The TP of the sell.
Backtesting on week-end gives you the spread when the trading session is closed on friday evening. Ask is always simple Bid+Spread. That can give you big spread when baktesting on week-end as genrally the spread is widened at the end of the session.