Forum

Global initialization failed

In 1335 and previous versions my EA compiled and ran fine on the terminal with no errors while running on compiling. Now after updating today, when attempting to add my EA to any chart I get 'global initialization failed' with no compile errors in build 1340. I've tried wiping the installation

Holding a value for X candles

void TouchedSR() { InsideResistance= false ; InsideSupport= false ; for ( int i= 0 ; i<10; i++) { double HiCandle = iHigh ( NULL , TradingTimeframe, i); double LoCandle = iLow ( NULL , TradingTimeframe, i); //Test for being inside a zone. if (LoCandle <= HI_Res &&

News events array

I have a code that reads the xml file from news events for the week and holds various information about the events. The code for the loop is supposed to only read the next news event in the array but it loops to the last instead. I am using the code below to do this if (StrToTime(DDateStr) > TimeGMT

Creating a buffer for Main symbol and Secondary symbol

I am trying to create a buffer in the FFC indicator that pulls the symbol for the upcoming news events. line 196 - 201 //--- Buffers double MinuteBuffer[]; double ImpactBuffer[]; double PreviousBuffer[]; double ForecastBuffer[]; string CountryBuffer[]; line 218 - 225 //--- indicator buffers mapping

One trade per candle on lower timeframe.

I have an EA that runs on the 4 hour chart and opens trade in a grid based on the new candle formation on the 15 minute timeframe . I am trying to limit the number of trades the EA takes by only allowing a certain number of trades on the 15 minute candle from the 4 hour chart. For example a new 15

EA hangs trying to close trade.

I have an EA that enters in a pyramid type grid. When DD hits a certain percentage it closes the first order opened in the basket, I tried coding this but it just seems to hang the EA. Can someone find the culprit in this code? Thanks in advance. //--- if (ch_b!= 0 ){ if

Coding ADR in EA

Struggling trying to hardcode the formula for 5 day ADR into my expert advisor. Not sure what I'm missing but it keeps returning 0. int dailyrange(){ int i= 0 ; for (i= 1 ;i<= 5 ;i++) R5=( iHigh ( Symbol (), PERIOD_D1 ,i)-( iLow ( Symbol (), PERIOD_D1 ,i))/ Point ); averagedailyrange = R5/ 5 ;

Order Send error 3 help

tmSignal(); if (buy()&& ( Bid >=RUDuentry && Bid <RUDutp1-min_distance* _Point && RUDuentry> 0 && RUDutp1> 0 && tmTrade== 1 /*&& (dotsBuy<atrproju) && (dotsBT1<drangeh)*/ )) { OrderEntry( 0 ,RUDutp1,RUDdentry); } if (sell() && ( Bid <=RUDdentry && Bid >RUDdtp1+min_distance*