moonsboy
moonsboy
moonsboy
Added topic What prices should be used for the target level?
When using OrderModify() to set the values of "takeprofit" and "stoploss", should I suppose the "takeprofit" or the "stoploss" is an Ask price or a Bid price for an existing long and short orders respectively
moonsboy
Added topic Does it mean the 2 variables are defined duplicated?
When you open an indicator code file, you can see both 'tick_volume[]' and 'volume[]' defined in OnCalculate().  You can see " const long & volume[], // Real Volume " in the help for OnCalculate(). May I understand the value returned from
moonsboy
Added topic is it really necessary to use NormalizeDouble() for OrderModify()?
You know 'stoploss' and 'takeprofit' are "double" types in OrderModify(). Is it still necessary to use NormalizeDouble() for 'stoploss' and 'takeprofit'?      e.g. I saw some EAs use  NormalizeDouble(histroyPrice, Digits) to
moonsboy
Added topic How to get the value of current hour?
I found this remark for Hour(): The value returned from Hour() will not change within the time of the program execution and it's the time of program start. Then please help tell how to get the latest hour of the MT4 server! Thanks and happy new
moonsboy
Added topic Why does the value returned from "MarketInfo( Symbol(), MODE_MARGINREQUIRED )" is '5' for EURSEK?
During EA testing , I find critical issue and l ater found the root cause is lotSize is high. Then checked the value returned from "MarketInfo( Symbol(), MODE_MARGINREQUIRED )" is '5' for EURSEK. I understand the margin/lot should be much higher than
moonsboy
Added topic How to fix the issue?
Wanted to testing the EA. But when downloading the symbol data, it always says "there are no new data for a symbol". However, the earliest data is just from Oct 15, 2014. I've modified charts to "1872000" in the "tools" --> "options". This kind of
moonsboy
Added topic How can this happen? So strange!
Dears,   Please refer to the script below. When 'total' is over 1, all open orders must be closed with the script almost at the same time .   However, when I tested it in the strategy tester , you can see the 2 orders below were closed with
moonsboy
Added topic How to control the text format when using fileWrite()?
How to control the text format when using FileWrite() ? e.g. add a tab between 2 words
moonsboy
Added topic Is the File Name Wrong?
When open a file, get the error "5002". Use "Print()" the file name,  got "C:\Users\900077605\AppData\Roaming\MetaQuotes\Terminal\3222703EF955C10T7523LJHO8922D2\Info.csv" Could you please help tell what is the name problem? Thanks! 
moonsboy
Added topic Is there a way available to check the correspondence between lots and units of different symbols on my account?
Dear friends,   Is there a way or function available to check the correspondence between lots and units of different symbols on my account? I searched on this site and didn't find it. Or where can I find the list of lots/units correspondence
moonsboy
Added topic which function can get the leverage value?
Dears, do you know which function can get the leverage value? Or how to get it
moonsboy
Added topic How to get the time period during marketing close?
Who can help tell how to get the time period during marketing close ? e.g. market close during weekend and holiday, how to detect and calculate the time period? Thanks for help
moonsboy
Added topic Why does "nearPosition" become "false" when it should be "true"?
Dears, When testing my EA, many orders sometimes were repeatedly opened at a same position. Finally I found the issue came from this sentence, "if(int(Time[0]-OrderOpenTime())>CandleInterval*PeriodSeconds(0)) nearPosition=false;". Below is the
moonsboy
Added topic How to get the latest time in seconds with functions?
Dears, How to get the latest time in seconds with functions ? e.g. if now the candle time is 2014.11.10 21:15:25, how to get it and transfer it to seconds? Thank you very much
moonsboy
Added topic is Close be regarded as Ask or Bid?
Should "Close" be regarded as latest Ask or latest Bid price? or the middle between Ask and Bid? Thanks for help
moonsboy
Added topic How to change the period of MT4 strategy tester to others? e.g. H12, 30S, .... ?
Dears, how to change the period of MT4 strategy tester to others? e.g. to H12, 30S, .... or only can select the options in the breakdown list? No other solution for it? Please help and thanks
moonsboy
Added topic Why does the order not start from the begining date defined?
I tested an EA with history data from Oct 31, 2013 to Oct 31, 2014. if I test M15, orders starts from June 9, 2014. If test H4, starts from Oct 31, 2013. What's the reason? how to fix
moonsboy
Added topic How to understand equity, balance and freemargin?
I see three functions: AccountEquity(), AccountBalance() and AccountFreeMargin(). How to understand the difference among the equity, balance and freemargin on my account? It's appreciated if you can help explain them one by one with their difference
moonsboy
Added topic Why does the EA always "close at stop" many days before end date for testing?
When I test an EA, it always "close at stop" many days before the end date set for testing. I double checked the code and there's no this kind of sentences. It means it happens not consistent with the code strategy, thereby misleading with the
moonsboy
Added topic Why are the most EAs in code base Scripts? Can script work as EA?
When you open the EAs from code base, you can see the main fuction is onstart() instead of ontick(). So I'm confused how the EA can work normally without ontick(). How can script work as EA? Could anyone please advise or comment? Thanks