Forum

Linear Regression Indicator

Hi all, I just found a Linear Regression Indicator for metatrader, unfortunately it's in mql, can somebody convert it to mq4? Any help is very appreciated. Here is the code : /*[[ Name := linear regression indicator Author := Copyright e 2004, Nick Bilak, beluck[at]ukr.net Link :=

Panel color

Hello all, I'm playing around with the MT4 simple panel (existed by MT4 default). I'm trying to change the background color but have no luck so far. Is it possible? if yes, how? Thank you

Something with iMAOnArray

Hi all, I'm on a verge of bilding multi pairs EA and I found some problem. I've try to trace the problem and checking some codes but I'm, stuck on this. Is anybody know why ma1 and ma2 are resulting different? int MAPeriod=100; int MAMethod=0; double clos[ 500 ]; for ( int k= 0 ;k< 500 ;k++) {

Can we making an EA based on indicator's alert only

Hello, Let say I have an indicator in EX4 file, it shows nothing but an alert only, which will tell me to buy, sell and exit the market. Can we make an EA base on this indicator only? Thank you

[Help] Change an indicator into a function in an EA

Hello all, I'm trying to make the indicator below as a function in the EA so the EA will be able working independently. Is anyone want to lay a hand? or at least give me a complete "how to" step by step so I can do it by myself.. Thank you

How to determine the last trade closed by stoploss or not?

Hello all, I need a help to correctly determine whether the last trade closed by it's stoploss or not. Is the code below enough? bool closebysl = false ; for ( int i = OrdersHistoryTotal ( ) - 1 ; i > = 0 ; i - - ) { OrderSelect ( i , SELECT_BY_POS , MODE_HISTORY ) ; if ( OrderClosePrice ( )

Reading text file

Hello All, It's me asking for help again. I have a text file, lets say it's name is "test.txt". The file is contain "100", "200" and "300" each separated by a space (100 200 300). Is there any way to get the "200" or "300" with the FileOpen and the FileRead function? Many thanks

Last trade profit/loss?

Hello, Is there any other way to see whether our last EA trade is profit or loss other than : string last ; for ( int i = OrdersHistoryTotal () - 1 , i >= 0 , i -- ) { OrderSelect ( OrdersHistoryTotal () - 1 , Select_by_pos , MODE_HISTORY ) ; if ( OrderSymbol () == Symbol () && OrderMagicNumber ()

Anybody know how to deal this indicator?

Hi All, Is anybody know how to deal with the attached indicator? I'm trying to build an EA base on this indicator, but somehow the indicator's color and the indicator's buffer is inconsistent. I can't see it repaint though. For better understanding, please look at the simple file written as an EA

Anybody know why it's not working?

Hi all, Is anybody know why the attached file not working? In short I'm trying to use a dinamic MA_Period. And it's working in more simple codes below. "test.mq4" (attached) is not working, please pay attention to "int MA_Period = perd(y);" line. The dinamic MA Period is working in the codes below