Forum

The OnTick function doesn´t seem to update every tick

// HelloWorld for MT4GUI // Lets include the imports file mt4gui.mqh #include <mt4gui2.mqh> // global Variable int hwnd = 0 ; int buy_check = 0 ; int sell_check = 0 ; int lot_size_label = 0 ; int lot_size = 0 ; int SL_label = 0 ; int TP_label = 0 ; int SL = 0 ; int TP = 0 ; int execute_button = 0 ;

My TP ends up too small compared to my SL, what other approach can I use?

Basically, I've been trying to set my TP in order to maximize my reward, which would be TP*P ( TP). After some math, taking into account the mean and Std deviation, I end up with a TP of 2.6 something pips, which, of course, maximizes the probability of hitting TP because is so small. On the

Probably a very basic question but I cant seem to find an answer, how can I get historical pricing data from MQL4 (not downloading it and reading it from a file)?

Ideally, I would like to end up with an array like [(O,H,L,C) 0 , (O,H,L,C) 1 , (O,H,L,C) 2 ... (O,H,L,C)n] where every tuple represents a candle and n=periods, n defined by me