Is this code correct? It will do 1 OR the other? I had a problem with if else statements the other day so just checking: if ( R1 - OvernightHigh < 0.0048 & & R1 > OvernightHigh )
Is there a way to work out the angle of an ema between 2 points. So, we have 2 candles, an EMA figure for hour 1, and an EMA figure for hour 2. We can then work out the hypotenuse and the angle
I'm getting order modify errors on this, not sure why - any ideas? //steppedtrail int FirstTP = 10 ; int SecondTP = 25 ; int ThirdTP = 50 ; int FourthTP = 100 ; int FifthTP
Will this code carry on the loop after the continue command or will it just skip it all if the magic number isn't 1 int total = OrdersTotal ( ) ; for ( int i = total - 1 ; i
My EA didn't create any pending orders this morning. Kt ha sbeen working finr in the strategy tester . However, this morning nothing, no errors. I have EAs enabled and live trading setup. Any ideas? Maybe I should change the hours, minutes, and
In the strategy tester , I run this: if (DayOfYear()>=88) {StartHour=StartHour+1;EndHour=EndHour+1;} However, it is always adding 1 hour even before March. Is it picking up the current server time? Do I have to use candle time instead? I can't see
This code gives me the occasional order modify error 1. It seems like the code checks that the stop isn;t the same so not sure why the error occurs; if ( TrailingStop > 0 )
I want to find the overnight high and low between 2 times but am having some anomalies in the numbers. Is this code correct? For example, at 0600 we work out out the highs and lows of all candles from 1900 to 0559 It doesn't seem to be counting back
I have 2 pending orders 1 BUY, 1 SELL. If 1 of these trades is triggered and hits its take profit , I want to cancel the other order. If it instead, hits its stop loss, I want to keep the other order
I am getting a lot of these errors in my code: Alert: Order 153 failed to close. Error:4108 Any ideas why? //+------------------------------------------------------------------+
I have an EA, which sets up 1 BUY and 1 SELL order every day. If one of the pending orders is opened and it hits either its TP or SL, I want the EA to pick this up and close any other existing pending orders. How can I check if an order has been
How do you find the last high and low between certain times? For example every morning at 0700 GMT, I want to find the high and the low between 2200 the day before and 0659 and display it. I know the time I will be running the code so could count
Is it possible to stop MT4 putting in a very short red line at the stop loss point of a trade? I already have the long horizontal line in there, so don't need it, and it gets annoying when the trade is over for it to stay there
If I reinstall MT4, will my existing charts, custom inidcators, etc. be saved? I need to download from a new broker rather than the old one I used so I can create demo accounts without having to contact their customer services