!!! Helping for free by coding of simple mql4(5) task. - page 2 1234 New comment [Deleted] 2016.07.18 20:38 #11 amando 2016.07.18 20:23 RUHello, i try to get out the pips of the closed trades, i had the idea, to count the difference between order openprice and orderclose preisevoid OnTick() { double Profit; // retrieving info from trade history for(i=0;i<OrdersHistoryTotal();i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) { if(OrderSymbol() ==_Symbol) { if (OrderType() == OP_BUY ) Profit +=OrderClosePrice()-OrderOpenPrice(); if (OrderType() == OP_SELL) Profit +=OrderOpenPrice()-OrderClosePrice(); } } } Print(Profit/Point); } [Deleted] 2016.07.18 21:59 #12 sheriffonline 2016.07.18 07:39I want to run my ea on following times: 00:15 to 20:30https://www.mql5.com/ru/code/14244 Функция работы программы по времени votes: 23 2015.11.23 Vasyl Nosal www.mql5.com Функция разрешает исполнение определенного кода в указанный промежуток времени. [Deleted] 2016.07.18 22:07 #13 Brt88 2016.07.18 12:35Hi.I would like to add to my open conditions sth like that:OrderOpenTime() of last trade + 4 Hours <= TimeCurrent()plz helpdatetime ord_time=Select_last_order_f(); if(ord_time!=0 && ord_time + 4*60*60 <= TimeCurrent()) ////////////////////////////if no pendings datetime Select_last_order_f() { datetime ord_time=0; for (int i=OrdersTotal()-1; i>=0; i--) { if(OrderSelect(i, SELECT_BY_POS)) { if(OrderMagicNumber()==Magic) { if(OrderSymbol()==Symbol()) { return(OrderOpenTime()); } } } } return(ord_time); } Mohammad Rizal Bin Rahmat 2016.07.19 02:11 #14 Mohammad Rizal Bin Rahmat: Just notice you edited... that was fast... thank you so much.. will testGreat work... appreciate it.... it works... what's the catch here? tele2112 2016.07.19 02:19 #15 please my friend code that task for me, i know you can do it, it would be great [Deleted] 2016.07.20 15:18 #16 Fahad3MQL4 2016.07.20 09:08 RUHi,This is my first try in programming a custom indicator, the indicator works, however, it wont refresh until I change the frame then come back to it.I know it is a logic issue, but I would appreciate any help.I want it to calculate every bar, however, it will display history bars only, not current one. Files:improved_strength_of_bar_score.mq4 8 kb -------------------------------------------------------------------------------------------------------------------Line 151. Zero divide./ ( High [ pos ] - Low [ pos ] )If some bar will have 1 pips?Somust be double H_L=( High [ pos ] - Low [ pos ] ); if(H_L==0) H_L=1;... / H_L Need Some Help with how to avoid big [SOLVED] See picture below Fahad3MQL4 2016.07.21 11:35 #17 Thank you Volli. It works fine now. [Deleted] 2016.07.21 11:57 #18 Fahad3MQL4: Thank you Volli. It works fine now. My pleasure. [Deleted] 2016.07.21 17:53 #19 Michalis Phylactou 2016.07.21 16:58 RUHelloAs I haven't worked with creating clickable objects on a chart yet. Can someone give me a code that- Creates a button that closes all active trades once clicked- Creates an text box that takes number input and a submit button that reads the number into the EA.It will help me get a move on.Thank you---------------------------------------------------------------------------------------------------------------------------It is creates buttons and open buy or sell.I think you will understand how edit it. Files: Buttons_EA.mq4 6 kb Creating a button that Edit box on chart The new MQL4 syntax Michalis Phylactou 2016.07.21 18:21 #20 Volli: Michalis Phylactou 2016.07.21 16:58 RUHelloAs I haven't worked with creating clickable objects on a chart yet. Can someone give me a code that- Creates a button that closes all active trades once clicked- Creates an text box that takes number input and a submit button that reads the number into the EA.It will help me get a move on.Thank you---------------------------------------------------------------------------------------------------------------------------It is creates buttons and open buy or sell.I think you will understand how edit it. Thank you Volli 1234 New comment
Hello, i try to get out the pips of the closed trades, i had the idea, to count the difference between order openprice and orderclose preise
sheriffonline 2016.07.18 07:39
I want to run my ea on following times:
00:15 to 20:30
https://www.mql5.com/ru/code/14244
Hi.
I would like to add to my open conditions sth like that:
OrderOpenTime() of last trade + 4 Hours <= TimeCurrent()
plz help
Just notice you edited... that was fast... thank you so much.. will test
Hi,
This is my first try in programming a custom indicator, the indicator works, however, it wont refresh until I change the frame then come back to it.
I know it is a logic issue, but I would appreciate any help.
I want it to calculate every bar, however, it will display history bars only, not current one.
-------------------------------------------------------------------------------------------------------------------
Line 151. Zero divide.
/ ( High [ pos ] - Low [ pos ] )
If some bar will have 1 pips?
So
must be
double H_L=( High [ pos ] - Low [ pos ] ); if(H_L==0) H_L=1;
... / H_L
Thank you Volli.
It works fine now.
Thank you Volli.
It works fine now.
Hello
As I haven't worked with creating clickable objects on a chart yet.
Can someone give me a code that
- Creates a button that closes all active trades once clicked
- Creates an text box that takes number input and a submit button that reads the number into the EA.
It will help me get a move on.
Thank you
---------------------------------------------------------------------------------------------------------------------------
It is creates buttons and open buy or sell.
I think you will understand how edit it.
Hello
As I haven't worked with creating clickable objects on a chart yet.
Can someone give me a code that
- Creates a button that closes all active trades once clicked
- Creates an text box that takes number input and a submit button that reads the number into the EA.
It will help me get a move on.
Thank you
---------------------------------------------------------------------------------------------------------------------------
It is creates buttons and open buy or sell.
I think you will understand how edit it.