Forum

This code gives different results on 1 minute and 1 hour chart

Hello, can anyone help me with this code. It should (if I have coded it correctly) give the same result on both a 1 minute and a 1 hour chart but it is giving a different result and printing the lines in different places on each? // This finds the start of a new bar using volume

Auto Draw Trend Line

Does anyone have the code to automatically draw a trend line ? I have the points but not the code to actually draw it. Much appreciated, Nigel

Locate the type of open positions.

I need to find out if the open positions on the account are either BUY or SELL positions. With my EA they will be either one or the other but how can I interogate e.g. if (OpenPosition() = BUY) Please advise, fairly new to MT4 many thanks

OrdersTotal

I am running an EA on 3 different currency pairs. Can I use ( OrdersTotal () ==0) to tell me that there are no open trades on any of the pairs or will it just apply to the pair on which it is operating? I want to be able to tell the EA for each of the pairs to stop trading if the profit level is