Forex Factory
  • Login

  • Username: Password:
  • 4:11am

  • Search
  • Home

  • Forums

  • Trades

  • Calendar

  • News

  • Market

  • Brokers

Options

Search

Subscribe to Thread

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

OrderModify error 130? 8 replies

Error #130... what else right? 17 replies

Ordersend 'error 130' - problems 1 reply

Illogical OrderSend error 4 replies

OrderSend error 4107 3 replies

  • Platform Tech
  • /
  • Reply to Thread
  • 3

Please help with this EA - Ordersend error 130

  • Post# 1
  • Quote
  • First Post: Nov 15, 2012 1:31pm
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
Hi,
please help me with this EA. It is a simple EA based on EMA cross with RSI confirmation, more info:
http://forums.babypips.com/free-fore...s-per-day.html

problem with this:
1. ordersend error 130, I have 5-digit broker (IBFX)
2. when moving SL to BE set distance (pips) from BE
3. trading time from: to:

Thank you very much for your time and help
Attached File
File Type: mq4 AmazingCrossover.mq4   13 KB | 35 downloads
  • Post# 2
  • Quote
  • Nov 16, 2012 9:52am
  • futurespec
    Joined May 2011 | 724 Posts | Status: If you think I'm mad, I must be mad
error 130 is invalid stops.

Not looked at your code but either you are setting stops with your order (many brokers do not allow that).
You need to set order and the modify the order for the stops.

OR

Setting stops too close too market

OR

invalid stop value format (use normalisedouble)

M.
  • Post# 3
  • Quote
  • Nov 16, 2012 10:09am
  • stevegee58
    Joined Oct 2005 | 892 Posts | Status: Pip Slappa Extrordinaire
You've attached a SL and TP to your initial order. If you're an American with a US broker that's not allowed.
You are in a maze of twisty little passages, all alike.
  • Post# 4
  • Quote
  • Nov 16, 2012 2:21pm
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
Thanks!
Could you please someone make a code change to the ECN broker?
  • Post# 5
  • Quote
  • Nov 16, 2012 3:12pm
  • stevegee58
    Joined Oct 2005 | 892 Posts | Status: Pip Slappa Extrordinaire
I use 7bit's common_functions.mqh for handling ECN and other mundane tasks:

https://sites.google.com/site/prof7bit/common_functions

Include the mqh file at the beginning of the EA. Set the global variable IS_ECN_BROKER = true in your init function. Replace your calls to OrderSend with orderSendReliable. It takes care of the ECN nonsense as well as retries, etc.

When you compile you will see a million warning messages fly past. Ignore them, they're harmless.

I use this file all the time and it works great.
You are in a maze of twisty little passages, all alike.
  • Post# 6
  • Quote
  • Nov 17, 2012 9:34am
  • cyber1
    Joined Jan 2011 | 592 Posts | Status: Member
Quoting Lookylook
Hi,
please help me with this EA. It is a simple EA based on EMA cross with RSI confirmation, more info:
http://forums.babypips.com/free-fore...s-per-day.html

problem with this:
1. ordersend error 130, I have 5-digit broker (IBFX)
2. when moving SL to BE set distance (pips) from BE
3. trading time from: to:

Thank you very much for your time and help
Added 1 and 3. I need a better explanation of what you mean in 2.
Attached File
File Type: mq4 AmazingCrossover.mq4   19 KB | 26 downloads
  • Post# 7
  • Quote
  • Nov 17, 2012 1:54pm
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
cyber1,
Thank you so much, I'll try !!

2. when trailing SL move to BE, I need gain a few pips,
for example: open price 1,23100, trailing SL 30, when price hit 1,23131, move SL to 1,20101 (+1 pips from BE)
  • Post# 8
  • Quote
  • Nov 18, 2012 4:14am
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
Guys, can anyone?

2. when trailing SL move to BE, I need gain a few pips (1,2,....possibility of setting
for example: open price 1,23100, trailing SL 30, when price hit 1,23131, move SL to 1,23101 (+1 pips from BE)

3. time settings
time from: EA begins trading from the preset time, the signal is valid only 1 bar that follows EMAcross + RSI confirmation, not later
time to: EA closes open trade and does not open any new trade

I thank you in advance
  • Post# 9
  • Quote
  • Nov 18, 2012 4:24am
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
actual version to modify:
Attached File
File Type: mq4 AmazingCrossover_.mq4   19 KB | 33 downloads
  • Post# 10
  • Quote
  • Nov 19, 2012 12:31pm
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
Cyber1,
problem with ECN fixed (EA work with IBFX)
THANKS !!
  • Post# 11
  • Quote
  • Nov 19, 2012 12:39pm
  • Lookylook
    Joined Jun 2007 | 8 Posts | Status: Member
How do I fix this problem:
When trailing SL move to BE (breakeven), I need to adjust the distance from BE, such as 2 pips ....

Can somebody please help?
thanks
  • Post# 12
  • Quote
  • Last Post: Nov 19, 2012 3:24pm
  • ssignal
    Joined Nov 2012 | 13 Posts | Status: Member
Hello,
A break even stop adjusts the stop loss to be equal to the order opening price, after a certain level of profit has been reached. The break even stop is independent from your initial stop loss and trailing stop.

The structure that you should use is something like this.

Inserted Code
  extern double BEProfit = 5;
  OrderSelect(ticket, SELECT_BY_TICKET);
  RefreshRates();
  double myProfit = Bid – OrderOpenPrice();
  double minProfit = BEProfit * PipPoint(Symbol());
  if (myProfit >= MinProfit   &&   OrderOpenPrice() != OrderStopLoss())
  {
     bool BE = OrderModify(OrderTicket(),OrderOpenPrice(),  OrderOpenPrice(),OrderTakeProfit(),0);
     if (BE == false)
    {
     ......
    }
  }
Regards,
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Platform Tech
  • /
  • Please help with this EA - Ordersend error 130
  • Reply to Thread
0 traders viewing now

©2013 Forex Factory, Inc. / Terms of Use / Privacy Policy

Forex Factory® is a registered trademark.

Connect

  • Facebook
  • Twitter
  • RSS

Company

  • About FF
  • FF Blog
  • Careers at FF
  • Advertising
  • Contact FF

Products

  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer

Website

  • Homepage
  • Search
  • User Guide
  • Member List
  • Online Now
  • Report a Bug