Forex
Google

Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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 Thread Tools Display Modes
  #1 (permalink)  
Old 01-07-2006, 05:45 AM
Penn State Penn State is offline
Junior Member
 
Join Date: Jan 2006
Posts: 1
Penn State is on a distinguished road
Need Help In Expert ..Please!!

Hello,

I am working on this Meta 4 Expert that sets Limt Orders befor
4Levels of Resistance and 4 levels of support.
The problem I am facing that it keeps on adding some of the
orders befor they get excuted or opened.
......................
Can some one tell me what and where to add instructions for the
expert to make one order only for each level and not to set another
order at that level until the first one is closed (Profit or Stop)
I mean not to double the order !!!
..................
It currently reads like this:

total=OrdersTotal();
for (i=0;i<total;i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if (OrderSymbol() == Symbol())
{
if((TimeDayOfYear(OrderOpenTime())!=DayOfYear()))
{
OrderDelete(i);
i--;
total=OrdersTotal();
}
else
{

........................................
and the order is Like this:

if (!L7Order)
{
ticket=OrderSend(Symbol(),OP_BUYLIMIT,Lots,L7+3*Po int+(Ask-Bid),0,L7-12*Point,L7+15*Point,"L7 Order",10017,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY L7 order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
}

.................................................. .............................
Also one of the Orders does not come on order window
it seems to have an error...can some one fix it please !!!
This is how it reads:

if (!L2Order)
{
ticket=OrderSend(Symbol(),OP_BUYLIMIT,Lots,L2+3*Po int+(Ask-Bid),0,L1-12*Point,L2+15*Point,"L2 Order",10012,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY L2 order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
}


................
Thank You.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-07-2006, 05:03 PM
traden4x traden4x is offline
Member
 
Join Date: Dec 2005
Posts: 38
traden4x is on a distinguished road
Penn State,
Good game the other night. Good to see JoePa win another for Happy Valley! I graduated from there in '88.

Why don't you post your whole EA so it can be reviewed. I might have trade execution routine that you can add your logic to. It checks for trades in that symbol and won't allow another until current trade is closed. A couple of us are working to enter multiple lots and close out single lots at different levels based on fib levels or pip profit as trade progresses and changing stop loss along the way.

Also describe in some detail trading method for possible logic change.

Last edited by traden4x : 01-07-2006 at 05:06 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expert Question and Expert mj10 Expert Advisors - Metatrader 4 24 03-27-2006 01:31 PM


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