What's wrong with the stoploss?
|
||||
|
Hi everyone,
this is a simple expert that actually came with the InterbankFX trader I believe. I noticed the stop loss is WAY off here. http://www.forex1000.com/FXFisherman/bullbear.mql If the stop loss is set at 30 then it will befor example a stop loss of 30.2227 instead of 1.2227 So above is the code in the mql format, can anyone figure out whats wrong with it? Thanks
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ |
![]() |
|
||||
|
Maybe this is a backtester's bug, you know it. If you compiled it already, then it should work just fine live.
Just to confirm if you replaced it right. Compare the following code with yours: Code:
Code:
Last edited by scorpion : 09-25-2005 at 12:57 AM. |
|
||||
|
Yep thats exactly what I have minus the space between the Bid and -Takeproft*Point
Ill check this afternoon if its only backtesting or not, but before it was both backtesting AND demo trading that had the problem, hopefully it will resolve it
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ |
|
||||
|
Nope its a problem with live trading as well. It's won 4 consective trades of 10 and 11 pips but stop losses are still at 31.xxxx also I noticed in the backtest its only making short trades, on the live testing all 4 were short as well but that might just be the trend.
Also noticed that it hits 10 and 11 pips profit (spread already passed) and then closes the trade. But the trailing stop is set at 10 and take profit at 30.. This doesnt make much sense..
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ ¦_____¦_____¦_____¦_____¦_____¦_____¦__ |
|
||||
|
It works just fine on my computer. Test below code.
Code:
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What's wrong with this moving average alert? | forextrend | Indicators | 3 | 03-28-2006 03:53 AM |
| How to know when a stoploss was hit. | TraderSeven | MetaTrader and ZeroCode | 0 | 07-30-2005 11:03 AM |
All times are GMT. The time now is 05:06 AM.
Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Registered members have access to special online forex currency trading tools, software, mt4 expert advisors and indicators. Register now










Linear Mode


