| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (1) | Thread Tools | Display Modes |
|
|||
|
Debugging MT4 is a pain in the a** but if you're patient you can figure out the problem.
The first thing I'd say is where ever MT4 tells you the problem is...it's not! The next thing I'd do is start cutting out HUGE chunks of code in the complicated IF statement that's most likely causing the problems. For example if I have... PHP Code:
Good luck. LUx
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
|
|||
|
Guys, thanks for your replies....but I'm a very big stupid man!!!
I didn't see the pharentesis that newdigital told me in his last post!! ![]() Sorry guys for my fault!!However here there's the code how I put it. Hope I can help someone that has need of it Code:
if (TimeDayOfYear(TimeCurrent())!=DayOfLastTrade)
{
if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "MaxPower Buy Order", MagicNumber, 0, DodgerBlue);
DayOfLastTrade=(TimeDayOfYear(TimeCurrent()));
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
}
Regards, Mauro
__________________
I'm studing to become an MQL Programmer! ![]() The best strategy to use ForexKiller. Try it: http://forex-killerallday.blogspot.com/ Last edited by mauro269; 06-20-2008 at 09:09 AM. |
|
|||
|
Update...
![]() As I have written in the post above the MQLeditor doesn't find any error. But I have attached the EA on the chart and it doesn't limit the order as I want (for example: if GU open a Buy Position and after it is closed, immediately after the EA reopen the buy order if it finds the signal. Instead I want that it doesn't open anymore buy orders). Any suggestion?Maybe I've placed the code in the worst way... Thanks for your help... Mauro
__________________
I'm studing to become an MQL Programmer! ![]() The best strategy to use ForexKiller. Try it: http://forex-killerallday.blogspot.com/ |
|
|||
|
Quote:
Hi,ND. could you give me a link to the ea you metioned above? Is it frank ea modified? thanks ![]() |
|
|||
|
It was original Frank. Look at this post http://www.forex-tsd.com/182221-post5.html
Modified Frank. Kalenzo modified Frank EA according to my request added timefilter to the trading martingale cycle (new cycle will not be started within some predefined trading hours). It is in elite section so it is better to ask Kalenzo. So, it is only different between modified and original Frank EAs. |
|
|||
|
i tried the set2stoporders ea from page1 but it opened multiple orders, and i don't know how to fix it, can anybody help.
i want it to open 1buy&1sell stop only each week. //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ void start() { double ldStop=0, ldTake=0; double pAsk=Ask+DistanceSet*Point; double pBid=Bid-DistanceSet*Point; if (StopLoss!=0) ldStop=pAsk-StopLoss*Point; if (TakeProfit!=0) ldTake=pAsk+TakeProfit*Point; SetOrder(OP_BUYSTOP, pAsk, ldStop, ldTake); if (StopLoss!=0) ldStop=pBid+StopLoss*Point; if (TakeProfit!=0) ldTake=pBid-TakeProfit*Point; SetOrder(OP_SELLSTOP, pBid, ldStop, ldTake); } Last edited by denis68; 07-27-2008 at 12:06 AM. |
|
|||
|
EA System
Hello i am looking for an ea which can do this:
1) buy or sell at a price level 2) if last trade hit TP then, immidiately opens another trade in same direction 3) if last trade hit SL then, immidiately opens another trade in opposite direction Any help would be appriciated. Thanks Pete Last edited by peterdias77; 08-10-2008 at 12:29 PM. |
![]() |
| Bookmarks |
| Tags |
| frank ea |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/expert-advisors-metatrader-4/12107-buy-sell-ea.html
|
||||
| Posted By | For | Type | Date | |
| Buy/sell EA - Forex Trading | This thread | Refback | 02-11-2008 06:20 PM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| wth do ppl sell EAs | jjk2 | Non Related Discussions | 65 | 07-14-2008 04:54 PM |
| Buy Gbp/Usd and Sell Euro/Usd | harryhid | Expert Advisors - Metatrader 4 | 112 | 05-14-2008 08:01 PM |
| Don't SELL, just BUY it | indratime | Suggestions for Trading Systems | 24 | 06-18-2007 11:23 PM |
| EAs that sell the ask and buy the bid... | forextrades | Expert Advisors - Metatrader 4 | 2 | 08-23-2006 01:58 AM |
| Sell here your EA ;) | forexts | Commercial Trading Systems and indicators | 0 | 11-30-2005 03:46 PM |