Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


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

Reply
 
LinkBack (1) Thread Tools Display Modes
  #31 (permalink)  
Old 06-20-2008, 08:52 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
For example this one:
Code:
DayOfLastTrade=(TimeDayOfYear(TimeCurrent());
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 06-20-2008, 08:53 AM
Senior Member
 
Join Date: Nov 2006
Posts: 180
luxinterior is on a distinguished road
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:
if(){
  
//second if
  
if(){
     
//third if
     
if(){
     }
   }

I'd chop out if's 2 & 3 and just leave if 1. Try to compile it. If it compiles you've narrowed it down. Then paste back 2 & 3 then chop out 3. Test again. Keep doing this for a few minutes and you'll eventually find the problem.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33 (permalink)  
Old 06-20-2008, 09:06 AM
Member
 
Join Date: Mar 2008
Posts: 44
mauro269 is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #34 (permalink)  
Old 06-20-2008, 02:31 PM
Member
 
Join Date: Mar 2008
Posts: 44
mauro269 is on a distinguished road
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/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #35 (permalink)  
Old 07-20-2008, 01:12 AM
Junior Member
 
Join Date: May 2008
Posts: 15
shmilya999 is on a distinguished road
Quote:
Originally Posted by newdigital View Post
It's all that we have concerning buy/sell.
Your case probable should be programmed so I was just made some attention.



For example this Frank EA can be modified.
I just attached this EA to the charts in the morning:

Attachment 53245


Hi,ND.
could you give me a link to the ea you metioned above?
Is it frank ea modified?
thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #36 (permalink)  
Old 07-20-2008, 05:42 AM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37 (permalink)  
Old 07-26-2008, 10:22 PM
Junior Member
 
Join Date: Apr 2008
Posts: 17
denis68 is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #38 (permalink)  
Old 07-27-2008, 09:16 AM
Junior Member
 
Join Date: May 2008
Posts: 1
suryati is on a distinguished road
haii...I think this is the best for me to try testing EA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #39 (permalink)  
Old 08-10-2008, 11:45 AM
Senior Member
 
Join Date: Mar 2006
Location: Dubai UAE
Posts: 240
peterdias77 is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #40 (permalink)  
Old 08-12-2008, 07:14 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,159
matrixebiz is on a distinguished road
Quote:
Originally Posted by newdigital View Post
Open 2 stop orders (sell stop and buy stop) by one script at the same time.
Script.
Download.
Author: KimIV.
Websource (in Russian).

That's all that I found.
How can I add the code to make it open the trades at a specific time?
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
frank ea

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

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


All times are GMT. The time now is 10:53 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.