Route206
Route206
Friends

Add friends via their profile or user search and you will be able to see if they are online

Route206
Added topic OrderClose() - error 138
Hi there, i have an issue with OrderClose() command generating error code 138 This seems to work OK, that is: No 138 errors void OnTick ()   {    if ( iTime (symb,timecheck, 0
Route206
Added topic Changing extern variables
Hi all, if you have the following program extern int var = 0 ; OnInit() { } OnTick() {    if ( var == 1 )    {     < do something>;      var = 0 ;    } } If during operation
Route206
Added topic Signal provider and Asset names
My broker uses EURUSD. (note the ".") as opposed to simply EURUSD Does that mean that my trading system can not be offered as an MT4 Signal? (ie. i'd be a signal provider ) and vice-versa, i can never follow a signal from someone how trades EURUSD
Route206
Added topic program execution
If i have an EA monitoring my account and able to close all my positions like: OnTimer ()   //a 1 second timer { If(AccountEquity()>target){ Close all positions with certain MagicNumber}} And at the same time have many EAs on as many
Route206
Added topic Accessing variables
Quick question: What takes less milliseconds to process? macd_signal= iMACD (ChartSymbol(), PERIOD_D1 , 8 , 21 , 5 , PRICE_TYPICAL ,MODE_SIGNAL, 1 ) OnTick () { Print (macd_signal); Print (macd_signal+ 1 ); Print (macd_signal+ 2 ); Print
Route206
Added topic How long is trade open? Exclude non-trading days
In one of my EAs i'm calculating how long a trade is open (in seconds) I used it to test if order were open for longer than a week. In such case the inclusion of a weekend was no factor. As i'm now thinking of testing for shorter periods - 2 or 3
Route206
Added topic SendMail() from EA and Chartchange
In my EA I have a simple trigger to send an email something like this: bool email_sent; [....] void OnTimer () {    if ([no positions]) email_sent= 0 ;    if ([positions open] && [some indicator > some value] &&
Route206
Added topic EA testing always returns "0" value for CCI indicator
Something is off... I've tested my EA before successfully, but now it does not work. The value for the CCI is always "0".    cci_long= iCCI ( ChartSymbol (),cci_timeframe[pos],cci_bars, 6 , 0 );    Print ( " CCI_long = "
Route206
Added topic TimeDayOfWeek() issue
I have a weird one below: The if statement should only be able to return 'true' on Fridays , yet i have this trigger every day for some odd reason and positions close as a result. void OnTick () { <snip>    if (TimeHour( TimeLocal
Route206
Added topic EX4 write error
Yesterday's upgrade to Win10 Pro version 1511 OSbuild 10586.17 seems to have wrecked the compiler! (I have MetaEditor 5.0.0.1218 ) Cannot compile anything and continue to get "EX4 write error". Starting Editor in compatibility mode doesn't help
Route206
Added topic using ENUM as input
Having problems with customer set inputs. i read: https://docs.mql4.com/basis/variables/inputvariables  but i cannot get it to work. this is what i want to do: simply create long/short as part of drop down box during input... #property strict
Route206
Added topic CRASH simulation
I have my EA protected for a crash by means of a file (crash.bin). While running the EA it writes the crash.bin file every 30s, and it holds important data for when having to recover. If the EA is removed on purpose then the crash.bin file is deleted
Route206
Added topic OnTimer() weird behaviour
i have the following simple code for an OnTimer() function:      void OnTimer ()   {    int bla= FileOpen ( "last.txt" , FILE_READ | FILE_CSV , " " );    if (bla== INVALID_HANDLE )     
Route206
Added topic run a *.bat from EA
Hello i'm looking to run a BAT file from a script (and upon successful testing ultimately from an EA). I've looked at  https://www.mql5.com/en/forum/139191  which i found very helpful but... #property strict #import "shell32.dll" int
Route206
Added topic Read values in file
Say i have a file: "DOWJONES.txt" the file is updated from time to time through email scripts whenever the file is updated, it needs to be read by an EA and the new values must be loaded. FileGetInteger() can tell me if a new file is present by
Route206
Added topic Hide OTH
Someone asked me an interesting question: Is it possible to Hide Outside Trading hours? So if you show DAX, that only bars during Frankfurt trading hours are shown and rest of data is discarded - that is: price is moving , but no bars are formed. I
Route206
Added topic while statement
I'm using the 'while' statement with great success for some recovery work. Embedded is a counter (for # of tries) and after such # of tries there are checks/balances before looping back to the counter such to ensure things don't take too long and
Route206
Added topic FileWriteArray() issue
I have use FileWriteArray() succesfully in multiple EAs, but this time it just writes "0"s  - or it doesn't write at all, despite the msg: File Write =OK. As i'm using the exact syntax i used in other EAs i'm really puzzled and after a couple of
Route206
Added topic \t in Comment()
I throw a lot of info on the chart in my EAs and would like to organize that a little better. To separate values I now go about it as follows: string text; text= StringConcatenate ( "tic= " ,tic, "    tac= " ,tac
Route206
Added topic close MT4
I could be overlooking this, but is there a setting in MT4 that gives the user a "are you sure?" question before closing MT4? Using RDP, I've closed MT4 a couple of times when I meant to close RDP. Yes, lot's of cursing... thanks
12