Forum

Notification phone issue

Hello, I'm receiving twice phone notification for same trade transaction, how can I fix it

Period calculation issue

Hello, I want to memorize in a variable the current time (when a condition happened) plus 5 Periods ( I'm testing EA in H1 timeframe). This is the code: if (RangecCandelaMax == High [ 1 ] - Low [ 1 ]) { if ( Close [ 1 ] < iBands ( NULL , 0 , 50 , 2 , 0 , PRICE_CLOSE

Close SELL order after opening a BUY order

I want to close SELL order after a BUY order is opened . I wrote this code but I have errors 138 and 4108, how can I fix it? ps: the orders are generated by SELL LIMIT and BUY LIMIT functions if ( OrderSelect (ticketBuy, SELECT_BY_TICKET )){ if ( OrderType () == OP_BUY ){

Orders open strange behavior

Hello, I have an EA that open #3 orders after candle close (if some conditions are true). The issue is that the orders are opened after 10 minutes from candle closing (see attached screenshot of Journal and chart). The orders should be opened at 4:30:00 instead of 4:40:00 Can you help me to

Unknown ticket error

Hello, I have this error in OrderModify fuction when run my code, can you help me? Thanks // Modifica TP per gli ordini a mercato SELL if ( OrderSelect (ticket2, SELECT_BY_TICKET )){ // verifica presenza ordine in SELL e lo seleziona if ( EntryPointBuy > OrderTakeProfit ()) {

ERR_INVALID_STOPS

I have error type 130 during OrderSend function , can you help me to fix it? extern string ParametriCandele = "Inserimento parametri candele di set-up" ; extern string CandelePrecedentiBuy = "Inserimento numero candele precedenti Buy" ; extern int candelePrecedentiBuy = 5 ; // candele

Critical error Array out of range

Hello, I have this error when run my EA: This is my code to open #3 orders, where is the mistake? int ticket[]; bool checkBuy = true ; int i= 3 ; //numero ordini void OnTick () { if ( Close [ 1 ] > Close [ 2 ] && checkBuy) { esecuzioneStrategiaBuy(); checkBuy = false

EA strange behavior in DEMO vs Backtest

Hello, I created my EA that open #3 orders at the same time when some conditions are true. In backtesting EA works fine and in Result I can see my #3 order with same open time: The issue is in DEMO. I see in Journal tab a time delay (seconds, until 1 minute) between Order Buy Market and Order Opened

Maximum range candle of last 5 candles

Hello, I want to identify the candle (in the last 5) that have maximum range (High[i]-Low[i]) . I wrote this code but for fill an array with range size: int candele = candelePrecedentiBuy; int i = 1 ; while (i <= candele) { RangeCandela[i] = High [ 1 ] - Low [ 1 ] ; } How can I

Optimization best time window

Hi, I finalized my first EA on XAUUSD and after run some back-testing to check the validity of my strategy I'd like to optimize my input variables. Is suggested to use a small time window (2/3 months) vs back testing to be adherence with last market conditions or not? Thanks Giovanni