Forum

Closing multiple orders and open opposite order

In my strategy to Start with .. I can have one buy signal and after some time I can have one more buy signal.. it might continue up to 10 times. Then when I get a sell signal, I need to close all the buy positions and open one sell position. Then the series of sell order may continue.. Basically, at

backtesting - differrent results for the same period for two differrent brokers

I am back testing a strategy on IBFX and FXCM platforms.. for the same period and the for the same pair.. the results between 2 are very differrent. Only differrence is on FXCM lot size is Mini and IBFX lot size is Micro.. I am not comparing the $ profit numbers.. I am comparing the % factor.. and

Does this logic work ?

static datetime Time0; int start() { bool newBar; newBar = Time[0] > Time0; if (newBar) Time0 = Time[0]; if (liHour == EndHour + GMToffset && newBar) more conditions here then open a buy or sell Return(0); } Does the above IF condition with AND clause work ? It worked on backtesting .. but on live

Close price of the bar

Hi, Learning MQ4.. so need help on some basic things Following is what I need to find: 1. I need to find bar close price only when the bar is closed. 2. How do I identify the time in Mq4 in this format : HH:MM:SS ? 1) To achieve the first one - I coded like this,, does this really provide the close

Newbie problem - with a basic function

I am learning this new launguage while trying to do some liitle things. Following is the sample code in the Start function to define a user function. I have 2 problems here. 1. The way I defined the function and/or called the does not look right. Hence I am getting lot of compilation errors. 2. In

Sample code for Moving averages crossover

Hello everybody, I am a newbie to this site as well as to the forex market (2 months). I have metatrader 4 demo account on which I am practising currently. I read about this jumstart strategy and would like to automate this to test the efficiency of this siganl. 1. parameters - 3 SMA, 5 SMA, Moving