Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I am using the following to check my sl and tp before placing the order
Code:
/
if (StopLoss<=MarketInfo(Symbol(),MODE_STOPLEVEL)) StopLoss=MarketInfo(Symbol(),MODE_STOPLEVEL)+3;
if (TakeProfit<=MarketInfo(Symbol(),MODE_STOPLEVEL)) TakeProfit=2*(MarketInfo(Symbol(),MODE_STOPLEVEL)+3);
Sometimes the sell goes through like the following
2006.06.29 08:32:56 AUDUSD,H1: open #5976740 sell 0.01 AUDUSD at 0.7309 sl: 0.7324 tp: 0.7278 ok
Maybe my stops checking is just not functioning correctly.
Any suggestions?
I think the error lies in the way you are placing your orders. If you are using stop orders, then your orders are too close to the market price. Typically, your buy stop should be atleast "MarketInfo(Symbol(),MODE_STOPLEVEL)" pips away from the current ask.
If you are placing stop orders, make sure you use RefreshRates() and then place the orders that required distance away. For fast moving markets, it still may not work and you will have to place the orders further away.
I am using the following to check my sl and tp before placing the order
Code:
/
if (StopLoss<=MarketInfo(Symbol(),MODE_STOPLEVEL)) StopLoss=MarketInfo(Symbol(),MODE_STOPLEVEL)+3;
if (TakeProfit<=MarketInfo(Symbol(),MODE_STOPLEVEL)) TakeProfit=2*(MarketInfo(Symbol(),MODE_STOPLEVEL)+3);
Sometimes the sell goes through like the following
2006.06.29 08:32:56 AUDUSD,H1: open #5976740 sell 0.01 AUDUSD at 0.7309 sl: 0.7324 tp: 0.7278 ok
Maybe my stops checking is just not functioning correctly.
Any suggestions?
Maybe u are using "+ 3" in both buy and sell. In sell u have to put "-3" to make it a valid price
I am starting to think that its interbankfx trying to prevent scalping when the market is tight. It works when the market is not tight - still it is confusing as once one's sl and tp are greater then MarketInfo(Symbol(),MODE_STOPLEVEL) it should open the trade.
Well, as you can see, I'm newbie in this forum. I'm Ignacio, from Argentina. And I trying to develop a simple EA.
I think that the strategy is "ready". But when I run backtest run, no orders are open. I've printed some debug info and the conditions are OK. The error throwed by the OrderSend function is 138.
Well, as you can see, I'm newbie in this forum. I'm Ignacio, from Argentina. And I trying to develop a simple EA.
I think that the strategy is "ready". But when I run backtest run, no orders are open. I've printed some debug info and the conditions are OK. The error throwed by the OrderSend function is 138.
I think there is no such a thing as requote in backtest. The problem, for my opinion, is happening because of the "RefreshRates" that maybe in backtesting can cause a requote problem. Consider this