MORE INPUT AND HELP NEEDED FOR FIRST OPENSOURCE (profitable milliseconds trading) HFT EA

 

Hello to all,

I have this HFT that I firstly made it to trade candle stick pull backs market momentum within micro seconds or seconds after a range filter has been achieved. Slippage was the challenge that I got when it came to live rather it did perform well on demo.

I moved to second step of making it trade candle sticks but on the direction of the market momentum. Once back tested it will achieve good results but once from tested it will lose the money.

I am hereby asking for help and input towards the EA’s success. As per now it is supposed to trade candle sticks above a certain range filter above or below the MA respectively from the price open to the price close.

I am sure that this is not the only indicator that such conditions can be achieved faster for a trade to be triggered. Secondly it is not accurate with the entry points. I am looking to modify this EA that it can perform couple of successful trades within a minute or second with over 70% success winning ratio. KEEPING IT SIMPLE IS MY MAIN GOAL. Just in case you have any idea of an indicator that uses volatility and in combination to preset conditions such conditions can be achieved fully within few moments then your input would be invaluable or in code form too.

This is one among the first HFT projects to be made public. With everyone’s input and sharing the final code would be my greatest happiness. Any ideas how I do this?

Kind Regards

Files:
liquidex.mq4  16 kb
 
fredkam: EA that it can perform couple of successful trades within a minute or second with over 70% success winning
Imo, you'll have to be so accurate within minute_bars that saying its un_realistic is an understatement. Volatility doesn't predict directions, it just indicates active markets. Over half your trades would be sitting in negative territory half the time. You'll need something more than volatility, you'll need a crystal ball.
 
fredkam:

Hello to all,

I have this HFT that I firstly made it to trade candle stick pull backs market momentum within micro seconds or seconds after a range filter has been achieved. Slippage was the challenge that I got when it came to live rather it did perform well on demo.

Don't double post, don't post off topic, I have removed your Duplicate thread from the mql5 forum . . .
 
ubzen:
Imo, you'll have to be so accurate within minute_bars that saying its un_realistic is an understatement. Volatility doesn't predict directions, it just indicates active markets. Over half your trades would be sitting in negative territory half the time. You'll need something more than volatility, you'll need a crystal ball.


What s your advise in this since you are an experienced trader sir? Kindly assist.....
 
RaptorUK:
Don't double post, don't post off topic, I have removed your Duplicate thread from the mql5 forum . . .


Thank you for the information.
 
ubzen:
Imo, you'll have to be so accurate within minute_bars that saying its un_realistic is an understatement. Volatility doesn't predict directions, it just indicates active markets. Over half your trades would be sitting in negative territory half the time. You'll need something more than volatility, you'll need a crystal ball.


What about using a larger time frame to determine the smaller time frame? Would that help? And what trading system would you offer advise for me to use to trigger trades just to improve on this one?
 
fredkam: What s your advise in this since you are an experienced trader sir? Kindly assist.....
HFT never worked for me. I'm not sure what type of improvement I could provide.
 
ubzen:
HFT never worked for me. I'm not sure what type of improvement I could provide.


What about scalper. I am sure that you have a good scalper that takes trades that materialize within a minute or so. So what do you think about that?
 

Currently, I share this view_point from this Article. https://www.mql5.com/en/articles/336

4. Time of Waiting T

If we are to enter and exit the market very often (for example, every minute), the rate will change little and profit we will be too little, but we still have to pay the fixed spread. The total spread will override all the profits, even if we will guess pretty well.

On the other hand, if you make deals very seldom (for example, once a year or once a month), then the spread will be negligible compared to the profit per trade. But you will have to trade for a very long time. Also, keeping a position opened for a long time is unprofitable due to swaps.

Therefore, there is some optimal frequency of deals. It depends on volatility of exchange rate and trade conditions, such as floating spread. Therefore, it is impossible to accurately calculate the optimal frequency of deals in advance.

However, it can be estimated. Without going into mathematical explanations and surveying, I will provide the following graph:



Figure 2. The boundaries and the center of the equity probability distribution function, when trading for one day with different times of T

On the graph in Figure 2 the abscissa axis shows time T - time of one trade of our trivial algorithm. The ordinates axis shows how many dollars of profit we would have from one dollar of capital by trading one day every T minutes, with no leverage and capitalization of profit on the EURUSD pair. Mathematically speaking, these are the boundaries of the probability distribution of our trivial strategy for different times T. The blue curve - for absolute guessing, red - for absolute not guessing, orange and teal - for "quite successful/unsuccessful guessing".

For example, entering and exiting the market every minute (M1), with $1 dollar of capital per day we could win maximum $0.5 and lose maximum $1.3. Most likely we would have lost $0.3. During the day we could make 1440 trades, paying $0.0002 of spread per trade. The total spread for all trades per day will be $0.288. The average size of EURUSD M1 bar is $0.00056. Winning with absolute guessing is $0.00056 * 1440 = $0.8064. Subtract the spread from of winning: $0.8064 - $0.288 = $0.51 profit from one dollar per day. Place point (М1, 0.51) on the graph.

We are interested in "fairly lucky" guess - the orange curve. Let's draw it in a bigger scale:



Figure 3. Profit of trivial trading strategy with sufficiently successful guessing at different times of T

Looking at Figure 3, we see that it is not profitable to trade more frequently than every 30 minutes - the spread devours all the profit. The optimal time T of trade for us lies in the range 1 hour - 1 week. Let's stop on it for now. Later on, when our EA will be finished, we will specify the optimal time using optimization. If someone has trading ideas of ​​predicting the rate better than 50/50, then the trivial algorithm can be improved. The optimal time and optimal bet will decrease as well.

By selecting the time T, we have actually chosen the timeframe of chart we will be working on. Strictly speaking, when the time T is given, you can can choose any timeframe - EA will work the same way, but drawing on the wrong timeframe will be uncomfortable.


 
fredkam: What about scalper. I am sure that you have a good scalper that takes trades that materialize within a minute or so. So what do you think about that?
Those guys probably have lower_spreads || know something most of us don't || both.
 
ubzen:
Those guys probably have lower_spreads || know something most of us don't || both.


Low spreads is not a problem to me. I have access to a broker who gives me good competitive spreads comparable to DMA spreads. SO my worry is how to make this work accurately on those good spreads. :)