NexusFi: Find Your Edge


Home Menu

 





Ea is sending multuple orders for particular condition


Discussion in Platforms and Indicators

Updated
    1. trending_up 1,771 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
ankityadav
indore+india
 
Posts: 30 since Jun 2013
Thanks Given: 2
Thanks Received: 2

hi can somebody tell me how to stop sending multiple orders for given condition by an ea at a time ...code ?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
The Confluence Meter: A Multi-Layered Signal Framework B …
The Elite Circle
Orban Crashes to 21pct on Record Turnout -- McIlroy Drop …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
kkfx's Avatar
 kkfx 
Mumbai, India
 
Experience: Intermediate
Platform: MT4, NT8,TradingView
Broker: AMP
Trading: Index,currencies
Posts: 117 since Jul 2010
Thanks Given: 326
Thanks Received: 163

The mql4 forum will be a better place for you to search answers about all mql4 related queries.
Check mql4 tutorials 30 episodes on youtube...quite nice tuts.

For your query....you need to check open orders if any before opening orders using a custom function like one below.

 
Code
 int OpenOrdersExist(string pair)
   {
     int total=0;
     for(int i=OrdersTotal()-1; i>=0;i--)
      {
        OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
        if(OrderSymbol()==pair) total++;
      }
      
      return(total);
   }
The above function counts open orders if any and returns the value as integer.

Then

 
Code
if (OpenOrdersExist(Symbol())==0)
{
//your entry algo here.
}


Reply With Quote




Last Updated on October 11, 2013


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts