nicolasxu
nicolasxu
nicolasxu
Added topic History ticks data in EA tester is very different from live ticks data from same broker
I am trying to find out why my EA doesn't work on live data. Here is what I found out:       Left section is real live tick from demo account, whereas right section is the history tick from same demo account. The broker I am using is
nicolasxu
Added topic connection time is 268ms, is this normal?
Here is my connection to FXTM server in China. Is this delay normal?  Can you please recommend a low latency broker?     Thanks 
nicolasxu
Added topic What is the default folder for reading external csv file?
I understand MT5 can not write file to directories other than in its own sub directory for security reason. Here, I am trying to read a file.  I am putting a csv file, "ssTestData.csv", to the folder
nicolasxu
Added topic Why my live data has 10 points spread, whereas on the same day, the history data has 20 points spread?
 On live data, the spread is about 10 points:       However, one day later, when I test EA with the tick data on the same day, the spread is 20 points. Question:  1. Why history spread is twice the live spread?   2. Is
nicolasxu
Added topic Why my limit buy order is not triggered after the current price is above my limit buy trigger price?
this is my limit buy order, trigger price is 1.06845.   Here is the current price, which is 1.06850, 5 points more than the limit buy trigger price. I submit this limit buy order at the open price of last 3rd bar and which is 1.06845. After
nicolasxu
Added topic How to send a limit buy order in MT5?
I placed a limit buy order using following code:   uint limitBuy( double amount, ulong magicNumber, double price, double tp, double sl) {    printf ( "limit buying %G lot, at %G price, TP %G, SL %G" , amount, price, tp, sl);
nicolasxu
Added topic How to create a variable to point to double &close[] ?
int OnCalculate ( const int rates_total,       // number of available bars in history at the current tick                  const int
nicolasxu
Added topic Possible bug in combining two take profit price in limit buy order
I submit one limit order 1: Limit Buy: 2 lots at 1.08000, TP 1.08200   order 2: Limit Buy: 1 lot at 1.05000, TP 1.05200   After the limit prices of both above two orders triggered, server uses arithmetic mean to actually combine the take
nicolasxu
Added topic What is the right way to detect a stop loss order triggered?
 When stop loss is triggered, the following log is generated by MT5.  2015.04.10 16:22:14 Core 1 2015.01.19 11:35:29   stop loss triggered sell 1.00 EURUSD 1.15417 sl: 1.16217 tp: 1.15317 [#5 buy 1.00 EURUSD at 1.16217]   This is
nicolasxu
Added topic What will happen if I open a limit buy and limit sell order at the same time?
I open a limit sell order and limit buy order both with take profit 300 points above the one price. For example: Order 1: limit buy at 1.08000, take profit at 1.08300, no stop loss Order 2: limit sell at 1.08000, take profit at 1.07700, no stop loss
nicolasxu
Added topic how to set spread to 2 points during strategy test?
When I issue a market by order for 1 lot of EURUSD, there will be immediate 17.00 dollars loss. I believe this is due to the markup that brokers put on top of market price.  I'd like to set the markup(Is this also called spread?) to minimum
nicolasxu
Added topic How can I draw multiple histogram for one bar in the separate window?
I can use the following code to create a histogram in separate window. But only one histogram bar for one candle bar of open- close price .  What should I do the draw several histograms for one bar?   #property indicator_type1 DRAW
nicolasxu
Added topic PositionSelect() failed with error code: 4753 on 1999.06.09 EURUSD
void updatePosition( const MqlTradeTransaction & trans, double & iPosition)  {    printTradeTransaction(trans);    if (trans.type == TRADE_TRANSACTION_HISTORY_ADD ) {        printf (
nicolasxu
Added topic In PlotIndexSetInteger(), what does the first parameter mean?
In the document here , it says the first param is the  Index of the  graphical plotting . Graphic plotting is one of the  ENUM_DRAW_TYPE.    Why it is always 0 in the example here? I think it should be one of the
nicolasxu
Added topic Linear Regression Moving Average Algorithm
//+------------------------------------------------------------------+\\ // Calculate LRMA //+------------------------------------------------------------------+\\ double LRMA( const int pos, const int period, const double   &price[]) {
nicolasxu
Added topic How can I know if a broker is trustworthy?
How can I find out if a broker is trustworthy? e.g.: They won't run away with my money.  I did a online chat with a broker. They told me : "Forextime is regulated by CySEC under license number 185/12 and registered with the UK FCA under
nicolasxu
Added topic Is broker with 0.1 pips spread real?
I am still a newbie.  In the screenshot, the spread of ATC Brokers is only 0.1 bips. Is this real? what this pro and con for this low spread broker?    Thanks!   
nicolasxu
Added topic Confusion about stop limit pending order
Say the current "EURUSD" price is 1.12345, and then I placed a order  MqlTradeRequest req = { 0 }; req.action    = TRADE_ACTION_PENDING ; req.type      = ORDER_TYPE_BUY_STOP_LIMIT ; //
nicolasxu
Added topic Standard way to detect stop loss transaction executed on a position.
 I've read this post . But I am still not clear.   Here is my log when stop loss is executed in strategy tester. Now I have a position. It looks like OnTradeTransaction() is triggered 3 times.  The MqlTradeTransaction is
nicolasxu
Added topic Can I use history to debug?
I know I can use history to test strategy, but I'd like to execute EA step by step on history data of a specific day, e.g. sep 26, 2014.   How can I do this?  
12