Forum

how can prevent button click event between click on and off

hello friend , I need help , i make button that open order , the problem is when click on , the order is open and when click off the order open again . how can i prevent it , i want only open in click on , click off is initial state. int OnInit () { createButton( "button1" , clrOrange , clrOrange

how make on off button object

i try to make button on off , that mean when click button ,it change color different before click ,how can do void createButton( string bName, color bgClr, color bClr, color tClr, int width, int height, int x, int y, string text){ ObjectCreate ( 0 ,bName, OBJ_BUTTON , 0 , 0 , 0 );

how backtest with spread zero

i want to know how can bakctest with zero spread.whenever I change to zero in spread box , strategy tester not read zero and show always current spread

how can get 1st 2nd 3rd order ticket number and their information

i have grid order example 1 st order ticket = 1 , lot = 0.1 ,openprice = 1.2345 2 nd order ticket = 2 ,lot = 0.2 ,openprice = 1.2367 3 rd order ticket = 3 ,lot = 0.3 ,openprice = 1.2389 i want to get their informations i tried as follow ,but not work , can get only first order information datetime

How delete remaining pending order while open new order in mql4

I need help bros. I have two pending orders in market. when one order is execute,the remaining pending order need to close. how can delete this pending order. ` OrderSelect ( OrdersTotal ()- 1 ,SELECT_BY_POS,MODE_TRADES); //selecting tha last order {

How can get buffer value from supply demand indicator

I want to call buffer value from zone indicator , it is multitimeframe indicator. here is its buffer int t1; t1= 0 ; SetIndexBuffer (t1,BufferResistance1); SetIndexEmptyValue(t1, 0.0 ); SetIndexStyle(t1, DRAW_NONE ); t1+= 1 ; SetIndexBuffer (t1,BufferResistance2); SetIndexEmptyValue(t1, 0.0 );

how can use python in mql4 file and how can backtest optimize it

I am interesting how to use python in mql4. can we use? how can use? and how can backtest and optimize it

how can I get gmt offset value for my current time

I try to calculate London market time in my market watch server time is 20:58 PM (9:58PM) in https://greenwichmeantime.com/ GMT is 7:43 PM DST UK is 8:43 market watch server time is ahead of 2 hr (GMT) 1 hr(DST UK) nearly if I calculate for current time int CurrentHour=Hour(); // Server time in

why optimization limitation parameter cannot change

When I try to optimize , I want to change these optimization limit but cannot change. why this happen

Optimization not continue although many hours long in testing time

I optimize EA with zigzag , it cannot continue its optimization although I run for many hours. Only three tests pass. why