Can somebody help me with a script that would make sure tp is specified?
My ea (ilan) sometimes does not specify tp once order is placed but will once another order after that is placed.
Can somebody help me with a script that would make sure tp is specified?
My ea (ilan) sometimes does not specify tp once order is placed but will once another order after that is placed.
By increasing Sleep time, will that help to ensure take profits are always set?
Hi tkaboris,
It is due to the requotes,
You should try to copy paste the conditions that modify the SL and to replace NewOrdersPlaced by something that determines the last stop loss, if this stop loss == 0 then apply the global stop loss to all trades.
Trading forex risk disclaimer. Exclusive EAs in the Elite section.
You should also include a line which does something similar to this before setting or modifying your SL to prevent any errors resulting from it being too tight:
That line will work for long SLs and you'd just need to modify it slightly for short SLs. Likewise, you can easily modify it for TPs as well.Code:if(SL>(Bid-MarketInfo(Symbol(),MODE_STOPLEVEL)*Point)) SL=Bid-MarketInfo(Symbol(),MODE_STOPLEVEL)*Point;
Last edited by jezzer1961; 04-20-2009 at 12:46.
PipRider.com - The home of the PipRider EA. From $100 to over $1m in 10 year backtest, and it works LIVE too!!