Forex Forum - EarnForex
Serving Traders Since 2005
 

Go Back   Forex Forum - EarnForex > MetaTrader > MetaTrader Expert Advisors

MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 28th April 2009, 05:26
Default Avatar
Junior Member
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error opening SELL order:130

hello chaps,

I was just testing MACD EA scripts, but I'm getting error 130 all the time, is it becuase Im on demo version of LConnection MT4 platform ?

thanks in advance.

pepe
Reply With Quote
  #2 (permalink)  
Old 28th April 2009, 06:12
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 1,542
Thanks: 18
Thanked 20 Times in 16 Posts
Default

It's because your takeprofit or stoploss are to close to the open or current market prices.
Reply With Quote
  #3 (permalink)  
Old 28th April 2009, 07:14
Default Avatar
Junior Member
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Enivid, But whats the nominal value to be used for takeprofit/stoploss if we executing the EA.
Reply With Quote
  #4 (permalink)  
Old 28th April 2009, 11:03
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 1,542
Thanks: 18
Thanked 20 Times in 16 Posts
Default

Quote:
Originally Posted by pepe View Post
Thanks Enivid, But whats the nominal value to be used for takeprofit/stoploss if we executing the EA.
That depends on the EA, broker and the currency pair. I wouldn't recommend setting stop-loss or take-profit lower than 10 pips for EUR/USD. On the other hand if you trade with a broker with 6-digit quotes (like 1.30023 instead of 1.3002) you need to multiply your SL and TP by 10.
Reply With Quote
  #5 (permalink)  
Old 28th April 2009, 13:24
Default Avatar
Junior Member
 
Join Date: Apr 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Enivid, I check that and would revert.
Reply With Quote
  #6 (permalink)  
Old 21st May 2009, 07:48
Default Avatar
Junior Member
 
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is possible that because the 5 digit price change in several brokers, your StopLoss\TakeProfit are too close to price and therefore you cannot enter.

If you post your code here I'll have a look.
Reply With Quote
  #7 (permalink)  
Old 18th January 2011, 06:57
Default Avatar
Junior Member
 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, sorry I also having OrderSend error 130

Hopefully someone can help
Below is my code

void oo(string ord)
{
int error;
int limit = 2500;
int stop = 500;
int lot = 1;
int slip = 5;
string ea_comment = "";


if (ord=="Buy" )
{
ea_comment=ea_name+" Buy Order Number: "+order_count;
error=OrderSend(Symbol(),OP_BUY,lot,Bid,slip,Norma lizeDouble(Ask-stop*Point,5),NormalizeDouble(Ask+limit*Point,5),e a_comment,1011);

}
else if (ord=="Sell")
{
ea_comment=ea_name+" Sell Order Number: "+order_count;
error=OrderSend(Symbol(),OP_SELL,lot,Ask,slip,Norm alizeDouble(Bid+stop*Point,5),NormalizeDouble(Bid-limit*Point,5),ea_comment,1021);

}

if (error==-1) //operation failed
{
ShowERROR(error,0,0);
}


return;
}
Reply With Quote
  #8 (permalink)  
Old 18th January 2011, 21:18
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 1,542
Thanks: 18
Thanked 20 Times in 16 Posts
Default

It looks like you are trying to buy at Bid and sell at Ask, while it should be vice versa.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)
 
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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategy Testing - Buy Sell from CSV H0bkwPiZGhZI MetaTrader Expert Advisors 1 25th September 2009 04:58
Need help in writing ea - Time factor to close order peterngkl@gmail.com MetaTrader Expert Advisors 0 26th August 2009 15:49
SECRET METHOD Trade Stocks 15 Min. On The Opening - www.ih8.net/a6c438 samjackie Advertisements 1 29th July 2009 12:41
Sell signal on weekly USD/JPY Lucien Technical Analysis 0 22nd May 2009 23:26


All times are GMT. The time now is 02:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Inactive Reminders By Icora Web Design

SEO by vBSEO 3.3.2