Anyone know what I did wrong :)
5 replies
Nufty
8 years ago #113779
Hi
I havent played with this tool for a long time – about 18 months.
I have found some spare time, so I thought I would have a go at learning it.
I failed on my first attempt and I cant see what I did.
Ignore the set up.. Its not a real system.
But the Entry point, the Stop loss and Take profit are what I want to make work.
The bot is set to take a trade if the last candle is a different color to the one before it. See no science there 🙂
THEN
It is supposed to set a STOP order, at a defined variable away from the open of the next candle – its called pipstoenter.
I set it at 2 pips
the order was sent, but it added 2 to the price.
That is, the EURUSD price was :
1.12026 and the EA set the price at 3.0000 the SL at 2.99956 and the TP 3.00100
Which just isnt even close!
Can someone have a look and see what I did wrong please
THANK YOU
G
tomas262
8 years ago #130778
Hi,
you probably have an incorrect definition of the stop price. You cannot just set number of pips in your case. You would need to use Addition() and ConvertToRealPips() functions for long order this way:
Addition ( Close[1] ; ConvertToRealPips ( PipstoEnter ) ) or alternatively using current bar Open:
Addition ( Open[0] ; ConvertToRealPips ( PipstoEnter ) )
So modify your order setting and order price as I mentioned. For short order use Subtraction() function.
Nufty
8 years ago #130787
Hi,
you probably have an incorrect definition of the stop price. You cannot just set number of pips in your case. You would need to use Addition() and ConvertToRealPips() functions for long order this way:
Addition ( Close[1] ; ConvertToRealPips ( PipstoEnter ) ) or alternatively using current bar Open:
Addition ( Open[0] ; ConvertToRealPips ( PipstoEnter ) )
So modify your order setting and order price as I mentioned. For short order use Subtraction() function.
So I do this in the CODE itself – not in the program ?
I am happy to try the code – but I dont have a lot of experience
THANKS for the reply
G
tomas262
8 years ago #130788
Nufty
8 years ago #130797
tomas262
8 years ago #130947
Viewing 5 replies - 1 through 5 (of 5 total)