Abdul Arief Bogie Ardianto / Publications
Forum
similar feature like ArraySetAsSeries() on static array?
i can get the latest MA value for the last 5 bar using dynamic array. thanks to ArraySetAsSeries(), it reverse it's saving point so that current bar MA will be saved to index 0 double MA_Handle[]; ArraySetAsSeries (MA_Result, true ); if ( CopyBuffer (MA_Handle, 0 , 0 , 5 , MA_Result)<= 0 ) {
Count the TOTAL pending order for all symbols, because mine only count current chart
this is what i've been using: for ( int j = 0 ; j < OrdersTotal (); j++) { if ((OrderTicket = OrderGetTicket (j)) > 0 ) { if (( OrderGetInteger ( ORDER_TYPE ) == ORDER_TYPE_BUY_LIMIT )) { CountBuyLim++; } } } and it is succesfully count the number on Buy
Question about ZeroMemory
in this doc Trade Operation Types all operation about placing a new instant and pending order have no ZeroMemory, but every operation about modifying or closing open order and pending has ZeroMemory in it. i experienced some error modifying SL/TP when i first start learning mql5 but i forget what
is it necessary to use ZeroMemory on TradeRequest?
i understand what the usage of ZeroMemory is. but then i see it was included on TradeRequest SL/TP modification . so, is it necessary to use it on pending order modification? because for each request-result action, the previous one will be overwritten right (cmiiw). all variables in my code will
is it possible to create both indicator and EA on a single .mq5 file?
i have some experience creating an .ex4 and .ex5 EA, but i have ZERO experience creating indicators. i never use any visual graphical object either to my EA. so quick question: 1. is it possible to add a custom indicators to an EA? 2. just curious, based on programing side: are indicators is the
do i need to code/include MA indicator?
i'm using this iMA docs and this smoothing on MT5 code as reference to add a simple MA 5: double MA_5simple = iMA ( Symbol (), PERIOD_H4 , 5 , 0 , MODE_SMA , PRICE_CLOSE ); but turns out the output is 10.0 and somehow this iMA is using int instead of double. i look for how to add MA, according
MQL5, is my understanding about filling policy is correct?
there are some changes in MQL5 compare to MQL4 that i had trouble fully understand them 1. Order and Position i read that there are order, deal, and position (and filling?). i had trouble understanding it fully. but at least in MQL5 i understand that i need to use Order when dealing with pending
MQL5 wizard has no OrderSend() but still opening a trade. How does it work
i have some experience in MQL4 and still learning MQL5 language. I understand most basic code conversion MQL4 to MQL5. Recently i learn that there is a MQL5 Wizard to create an EA automatically. Tried to make it create a simple EA to open buy if RSI>80 and sell if RSI<20. It works but i have no idea