Forum

TimeCurrent() and iTime() bug/problem

Hi guys, Just come across an interesting problem/bug and not sure if it's been identified before or even if it's broker specific. Try using the following in some indicator code, have the indicator running at startup and note the values when you first run MT4 (make sure MT4 hasn't been running for at

Storing 0.07 as a double - impossible???

Is it just me, or can 0.07 not be stored accurately? Example double number= 0.07 ; Comment (number); This displays as 0.07000000000000001, therefore I can for instance send an order using a lot size of 0.07

#property version query

Hi all, anybody know if there is any way to get the string stored in: #property version "1.00" and to display it on the chart in comments, ie: Comment ( "\n" ,title, " EA (" , version , ")\n\nWaiting for a tick to start..." ); Thanks

truncation of constant value Error

Hi, more annoying than a major problem, but when I try and use the following I get the "truncation of constant value Error" #define INTERNET_FLAG_RELOAD 0x80000000 #import "wininet.dll" int InternetOpenUrlW( int , string , string , int , int , int ); #import InternetOpenUrlW(hOpen

erroneous arrows being plotted - Help!!!

Hi guys, I'm trying to plot arrows where the TDI crosses the RSI line but I get extra arrows, anyone got any ideas - it's been driving me crazy. It plots OK if I compile when MT4 is running, but changing time frames or restarting messes things up. Cheers. int start(){ if ( Bars <= 10 ) return ( 0 );

Append to end of line when writing to CSV

Hi guys, I could do with a little help if anybody can please. I'm writing a few trade details to a csv file, which is all fine and working how I want. However, when I record the trade close information, I would like it to append to the last line of data if possible. At the moment, it is creating a

Text labels on Horizontal Lines

Hi, I wonder if anyone can help. I have made an indicator which plots horizontal lines on a chart. Each line has a label using the following code: ObjectCreate("label", OBJ_TEXT, 0, TimeCurrent(), value); ObjectSetText("label",label, 8, "Arial", text_colour); ObjectMove("label", 0, Time[0], value);

Downloading a file using a custom indicator

Hi, I've written a custom indicator that uses data from a csv file located in ../experts/files/ folder, and I've got it working great for my needs. However, the source csv file changes each day, which means me downloading it and placing it in the correct location. I've searched extensivly but cannot

Importing data from a CSV file

Hi, I have a csv file which is formatted as follows: GBPUSD,1.2345,1.2345,1.2345 EURUSD,1.2345,1.2345,1.2345 EURJPY ..... The data represents: Symbol, High Price, Low Price, Close Price I would like to import the data from the file, and match the currency symbol to the current chart, the use the