Do I need to use GlobalVariableSetOnCondition with ARC

 

I have multi EAs running though one DLL and a include file. 

I am unclear on how to handle mutex code with ARC. I use  GlobalVariableSetOnCondition for the orders but have not used this type on command on ARC. I am confused about the scope of the array. I thought if I called ARC in a indicator and agian  in a  EA that those arrays are fine if the return a Value for ARC>1 Below is my Current Trap

     if( iMaximumRecords<=0)
  {
              for(int i=5;i>=0;i--)
      {
         iMaximumRecords = ArrayCopyRates(Rates, szSymbol, iTimeFrame);  
         Print(" Sleep watting to down load Data "+szEAString+" --- "+szSymbol+ " --- "+iTimeFrame ); Sleep( 250); 
         if( iMaximumRecords> 0){ i=0;}

     }
     
  }
   
      if(          iMaximumRecords<=0)
    {
    
    Alert("Copy Rates Failed for"+szEAString+" --- "+szSymbol+ " --- "+iTimeFrame );return;
    }
 

JeffCrystal:

I am unclear on how to handle mutex code with ARC.

I use  GlobalVariableSetOnCondition for the orders but have not used this type on command on ARC.

I am confused about the scope of the array.

I thought if I called ARC in a indicator and agian  in a  EA that those arrays are fine if the return a Value for ARC>1 Below is my Current Trap

  1. What is ARC? Are you meaning ACR as in ArrayCopyRates?
  2. What's the difference?
  3. what's the scope of where you declared rates[][]
  4. Indicators Can NOT sleep.
  5. The documentation says if ACR returns zero, check GetLastError. IF and only IF it returns History will be downloaded should you sleep for 10 seconds (not 1/4) and then RETRY the call.
  6. Call ACR ONCE in init - no sleep, no mutex required. In start, check Rates[0][0] for a non-zero time. Then you have history nBars = ArrayRange(Rates, 0)
       //{https://forum.mql4.com/36470/page2 says ArrayCopyRates is a nonreentrant,
       // non-thread-safe call. Therefor you must put a mutex around the call in
       // case of multiple EAs on multiple charts. Alteratively, since init() is
       // single threaded across all charts, put all ACRs there.
       //}
    

 
WH. You know so much it is hard to chat with you. 
  1. What is ARC? Are you meaning ACR as in ArrayCopyRates?  yes
  2. When scanning i call ArrayCopyRates and send every time frame and symbol to DLL . When I send a order I will not all it to go unless  GlobalVariableSetOnCondition clears it.
  3. I declare Rates in the Indicators and in the Ea not IN the includes. 
  4. on int() and start() --- one time on start I sleep for 4 seconds. To allow the data on the chart to come in.
  5. Understand
  6. This would require setting arrays for several pairs in the Int. I assumed it was better to call back though rates and clear out the old one when I need a new symbol and time frame.
 
JeffCrystal: WH. You know so much it is hard to chat with you.
Because I am not a mind-reader
ARC   Archive (File Name Extension)
ARC   Amateur Radio Club
ARC   Arcade
ARC   American Red Cross
ARC   Ames Research Center
ARC   Appalachian Regional Commission
ARC   Academic Resource Center
ARC   American River College (Sacramento, CA, USA)
ARC   Applied Research Center (various organizations)
ARC   Architectural Review Committee
ARC   American Refugee Committee
ARC   Annual Report Card
ARC   Annual Report to Congress
ARC   Agence du Revenu du Canada (Canada Revenue Agency)
ARC   Annual Required Contribution
ARC   Access to the Region's Core
ARC   Attack Retrieve Capture (game)
Arc   Arcadian (linguistics)
ARC   Australian Rally Championship
ARC   Anti-Reflective Coating
ARC   Arcuate Nucleus
ARC   Aeronautical Research Council (UK)
ARC   Archival Research Catalog (online catalog of National Archives and Records Administration)
ARC   Accounts Receivable Conversion (banking; aka check conversion)
ARC   Association pour la Recherche sur le Cancer
ARC   Accounts Receivable Check
ARC   Armored Cavalry Regiment
ARC   Attached Resource Computer
ARC   Action for the Rights of Children (Switzerland)
ARC   Affinity Reality Communication (basic elements of understanding; Scientology)
ARC   Architecture Review Committee
ARC   Amtrak Reform Council
ARC   Angle Range Compensation (Bushnell range finders)
ARC   Arctic Research Commission
ARC   Advanced Recon Commando (Star Wars)
ARC   Airworthiness Review Certificate (aircraft inspection)
ARC   Agglomération de la Région de Compiègne (French: Metropolitan Region Compiègne; Compiègne, France)
ARC   Aviation Research Centre (India)
ARC   American Retirement Corporation
ARC   Army Reserve Command
ARC   Annual Report on Carcinogens
ARC   Caribbean Revolutionary Alliance (Martinique)
ARC   Accelerating Rate Calorimetry
ARC   Attorneys for the Rights of the Child
ARC   Aboriginal Rights Coalition (Australia)
ARC   Appraisal Requirements for CMMI (Capability Maturity Model Integration)
ARC   Advocacy for Respect for Cyclists (Toronto ON, Canada)
ARC   Alternative Resources Corporation
ARC   Alliance to Rescue Civilization (human survival group)
ARC   Architectural Resources Cambridge, Inc (Cambrige, Massachusetts)
ARC   Activator-Recruited Cofactor
ARC   Acquisition and Restoration Council (Florida)
ARC   America Reads Challenge
ARC   American Radiolabeled Chemicals, Inc.
ARC   Agricultural Resources Center (Raleigh, NC)
ARC   Anomalous Retinal Correspondence
ARC   Arc-Second Raster Chart
ARC   AntiVirus Research Center (Symantec)
ARC   Advanced Resuscitation Certificate (Australia)
ARC   Association of Recruitment Consultancies (UK)
ARC   Archaeology Research Center (University of Southern California)
ARC   Allison Road Classroom (Rutgers University building; New Jersey)
ARC   American Research Corporation (Monterey Park, CA)
ARC   Army Reuse Center
ARC   Ancient Rosae Crucis
ARC   Alarm Reporting Control
ARC   Anthony Robbins Companies
ARC   Assessment Requirements for CMMI (Capability Maturity Model Integration)
ARC   American Releasing Corporation (est. 1954)
ARC   Abnormal Retinal Correspondence (ophthalmology)
ARC   Architectural Research Center (various locations)
ARC   Appliance Research Consortium
ARC   Arabian Racing Cup
ARC   Alternative Recycling (Tax) Credit
ARC   Admission and Release Committee
ARC   Africa Reconciliation Committee
ARC   Accounting Requirements Code
ARC   Aquatic & Recreation Center
ARC   Anti Reflecting Coating
ARC   Augmented Reality for Construction
ARC   Audio Response Controller
ARC   Atomic Radio Clock
ARC   Asociaciòn de Remo del Cantábrico (Spanish: Cantabrian Sea Boat Racing Association)
ARC   Acoustic Research Center
ARC   Agency Ranking Committee
ARC   Albany Rowing Center
ARC   Aide au Recrutement des Cadres (French: Recruitment Assistance Frameworks)
ARC   Accueil, Rencontre, Communaute (UK)
ARC   Adolescent Recovery Center
ARC   Armada República de Colombia (Colombian Navy)
ARC   Area de Consultoria (consulting services)
ARC   Army Recruiter Course (US Army; Fort Jackson, SC)
ARC   Active Range Clearance
ARC   Academic Resource Coordinator
ARC   Average Response Computer
ARC   Average Runlength-Constrained
ARC   Automatic Range Control
ARC   Admissions and Registration Council
ARC   Additional Resource Charges
ARC   Armature Reaction and Commutation
ARC   Allocation Review Committee (New York Stock Exchange)
ARC   Andromeda Research Corporation (Gaming, Uplink from Introversion Software)
ARC   Augmentation Research Centre (Stanford Research Institute; California)
ARC   Afghan Relief Committee (NGO)
ARC   Applied Rheology Center
ARC   Actions de Recherche Concertée (French: Collaborative Research Activities; Belgium)
ARC   Activity Relationship Chart
ARC   Area Reprogramming Capability
ARC   Architectural Research Consultants, Incorporated
ARC   Architecture Restoration Conservation (New York, NY)
ARC   Automatic Relay Calculator
ARC   Administration Radio Conference
ARC   Aggregation of Red Cells
ARC   Alpine Rescue Center
ARC   Agencia Radiofónica de Comunicación (Spanish: Radio Communications Agency)
ARC   Auto Rétro Club (French: Vintage Car Club)
ARC   Athénée Robert Catteau (Brussels, Belgium)
ARC   Automatic Radio Control
ARC   Automatic Reaction Control
ARC   Aviation Refueling Capability
ARC   Atmospheric Reduced Crude
ARC   Auto-Refrigerating Cascade (cryogenics)
ARC   Automatic Rent Collection
ARC   Array Compensated Resistivity (oil and gas well logging)
ARC   Advanced Rotor Concepts
ARC   Amphibious Reconnaissance Course
ARC   Automated Routing and Completion
ARC   Attack Response Controller
ARC   Automatic Call Distribution Remote Capture (JC Penney)
ARC   Alternatively Refined Carrageenan
ARC   Adaptive Reception Control
ARC   Active Recreation for Children (UK)
ARC   Aboriginal Resource Consultants (Perth, NB, Canada)
ARC   Address Resolution Client (part of ARP)
ARC   Analytical Research Collective
ARC   Automatic Restart Circuit
ARC   Auto Rétro Cotentin (French: Retro Auto Cotentin; automobile club)
ARC   Atlanta Recumbent Cyclists
ARC   Archive of Renal Cancer
ARC   Anti Ragging Committee
ARC   Ambiguity Resolution Code
ARC   Activity Readiness Code
ARC   Acronym Review Committee (fictitious)
ARC   Area Coordination Review
ARC   Aziende Riunite Caffè
ARC   ATSR Reprocessing for Climate (ATSR = Along-Track Scanning Radiometer; climatology)
ARC   Articulated Robot Controller (software)
ARC   Adapter Return Code
ARC   Acquisition Review Committee/Council
ARC   Advanced Resource Corporation
ARC   Amplitude and Rise Time Compensation
ARC   Alarm Response Card
ARC   Angelic Ransom Covenant
ARC   Avaliable Resource-driven Control-flow
ARC   Australasian Registrars Committee (museums)
ARC   Auto Rating Consideration
ARC   Auto Reseting Counter
ARC   Asset Reporting Code
ARC   Assign Remote Connection
ARC   Assistant Regional Commissioner/Counsel
ARC   Amber Rum & Coke
ARC   Alianza Para el Resurgimiento del Camerún (Spanish)
ARC   Acorn Resource Centre (UK)
ARC   Associate Response Center
ARC   Architecture-Recherche-Communication (French: Architecture-Research-Communication)
ARC   Auto Rétro Cevennes (French: Retro Auto Cevennes; automobile club)
ARC   Automatic Return Code
ARC   Automatic Reflux Control
ARC   Authorized Restriction Code
ARC   Austin Roasting Company
ARC   Automated Radio Communication
ARC   Alcoholism and Related Conditions
ARC   Alianta Romanilor Canadieni (Romanian: Alliance of Romanian Canadians)
ARC   Alberta Research Council (Alberta, Canada)
ARC   Alcohol Rehabilitation Center
ARC   Albany Research Center
ARC   AIDS Related Complex
ARC   AIDS Resource Center
ARC   Air Race Classic (Alva, FL)
ARC   Air Reserve Components (US DoD)
ARC   Airborne Radio Communication
ARC   Aircraft Resource Center (online resource center)
ARC   Airline Reporting Corporation
ARC   Airlines Reporting Corporation
ARC   Affordable Residential Communities, Inc. (Denver, CO)
ARC   Agricultural Resources Committee (Friday Harbor, WA)
ARC   Agriculture Research Center
ARC   Aging Research Center
ARC   Aging Research Centre
ARC   Agrarian Reform Community (Department of Agrarian Reform; Philippines)
ARC   Agricultural Research Center (Egypt)
ARC   Agricultural Research Centre
ARC   Agricultural Research Corporation
ARC   Agricultural Research Council (Pretoria, South Africa)
ARC   Alien Registration Card (aka Green Card)
ARC   Alliance for Rail Competition
ARC   Alliance of Reformed Churches
ARC   Alliance of Religions and Conservation
ARC   Alternate Route to Certification
ARC   American Record Company (est. 1929)

 
JeffCrystal: This would require setting arrays for several pairs in the Int. I assumed it was better to call back though rates and clear out the old one when I need a new symbol and time frame.
  1. Never Assume
  2. There is no clearing out of old ones. ACR does not move data. It redirects the array to internal storage.
Reason: