Forum

Difference in TP and SL in OrderSend command

Hi, I have a problem. In my trading history or in opened trade list I see differnce in TP or in SL. I set example TP and SL = 5 pip. After opening trade the TP and SL has not the required value: The EA open a trade usdjpy at 113.459, I see TP 113.504 and SL 113.404. But I send with the OrderSend

Function execution in a specified time

Hi, how can I code if I want a function of my EA is only executioning in a specified time. Example allways only in the 30th minutes of a hour. if ( Minute ()== 30 && Seconds ()== 0 ) { .... } Thanks for help

Custom indicator in different colors

Hi, please help me, I am confused: I try to make a custom indicator based on MACD. If the MACD gives a long signal, my custom indicator gets green histogram, at short signal get red color. Everything is working except the color changing. I tried this code to change indicator color: if (macd_line[i]

mfe & mae calculation

Hi, I like to get candles highs & lows to calculate mfe&mae. I have written a script wich is getiing trade infos from history after magic number and symbol. The script is working properly until the code arrives to get the candle highs&lows. Here is the code, I have a problem with for ... I am

Is it possible to get a candle high under MT4 strategy tester?

Hi, I have a problem: Is it possible to get a candle high under MT4 strategy tester ? I have tried with this code, but what I got is 0 or something wrong tick data. candle_count=iBars( Symbol ()); tesztfile= FileOpen ( "adatgyujtes.txt" , FILE_WRITE | FILE_CSV , ";" ); FileWrite (tesztfile, "nyitoar

How can I solve the redraw of chart object after timeframe change?

Hi, I have a problem. If I change the timeframe on a chart with EA running, the object what my EA writes stay unchanged. I like the write on the chart example the profit. After TF change the profit write refresh doesn't work, I see example 0 if the start profit was 0. Here is my code from my EA: int

My EA opens many order one after another instead of one

Hi, please help me. My EA opens many order, not only one per pair. I don't know what is the problem in my code. In this session I am checking the order, if found live order the liveorder=true would block to open more than one order per pair. But doesn't work: for (counter1= 0 ; counter1<=