Forum

unable to read indicator values through buffer

Hi I need an indicator that is able to detect major and minor Swing highs and lows, I found a perfect one but they didn't set the buffer values right so It is not possible to read any values and I would like to be able to read the values to build an EA, anyone has a similar indicator that ouputs the

Detect new candle for each timeframe

Hi I want to have a function that I can call from on Tick() that returns a bool if there is a new candle or not for a specific timeframe. I've come up with tis but it's not working properly. bool isNewCandleFormed( int timeframe) { static datetime last_candle_timeM5 = 0 ; static datetime

MT4 strategy tester not reliable

Hi, I coded an EA and left it running on a vps for a month, then I tried to run the same dates and same inputs on the strategy tester the results are so incredibly different, it made 3x more profit on the vps and I have modeling quality 99.90%. Is there any other way of testing my EA that's more

organize all open orders in arrays

Hi guys, I've been trying to separate my open orders from BUY/SELL and also sort then, this can be done at the OrderSend() level. but then I will close some of my orders and I would need to be able to delete and add array elements and shift the elements and still maintain the order I couldn't find

Code check for open orders not working

Why the hell is this simple function not working, I use it in my if statements for buy !CheckOpenBuyOrders() and sell ! CheckOpenSellOrders(). bool CheckOpenBuyOrders(){ for ( int i = 0 ; i < OrdersTotal () ; i++ ) { OrderSelect ( i, SELECT_BY_POS, MODE_TRADES); if

Indicator buffer not reliable can I detect when it gives out an alert?

Hi guys, Im using an indicator that I want to know when it prints out an arrow on he chart, so Im logging all the buffers and checking all when the event happens but nothing ever changes on the buffer, the buffer is always like this. SmartMoneyEA1 GBPUSD,M1: Buffer 7: 0 SmartMoneyEA1 GBPUSD,M1

Making sense of Camarilla Indicator Pivots

Hi guys, I've been messing around with the Camarilla Indicator and I wanted to get the main pivot values for my EA, can I use iCustom() for that? or should I just pass the code to the EA? but where exactly would I place it? I tried to place it on the onTick() but with a condition of only calculating

OrderSend wont execute

Guys please help me out, Im sure I got some obvious mistake on my OrderSend function but I cant find whats wrong with it. The if statements appear to be wright because I get the Print SELL and BUY when I want to, but no order gets executed. stopLoss = 5 pips, MaxRiskPerTrade = 1, slippage = 2. if

Check price every tick and open Order when certain price is reached

Guys I have no ideia why I cant make this simple operation in my EA code work. I first tried to compare the doubles of both prices but I realized that there is something tricky about comparing doubles so I decided to apply some math instead but still cant make it work. Please Help. double H3 =