Forum

Current Bid/Ask price to CSV file.

Suppose I want to output the current Bid/Ask price to a CSV file. Whenever the price changes , I want the file to update. I was thinking something along the lines of this might work. double PreviousAsk; //+------------------------------------------------------------------+ int init() { int

for loop

int init() { int handle; handle= FileOpen ( "countmein" , FILE_CSV | FILE_WRITE , ';' ); if (handle> 0 ) for ( int Counter = 1 ; Counter <= 100 ; Counter++) { FileWrite (handle, Close[Counter], Open[Counter], High[Counter], Low[Counter]); FileClose (handle); }

what is wrong with my code?

So I have this Median indicator Here is the code .... #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Black #property indicator_width1 2 extern int Length = 14; extern int ApplyTo = PRICE_CLOSE; double median[]; double array[]; int midlea; int midleb;