Forum

Tranfer Processing Control

Hi All, How do I transfer program control , in MQL4, to a specific line? For Example, using VBA you could go after, Line #1 to Line #6 (Skipping line #2-#5). Code Line #1 GoTo ResumeHere Code Line #2 Code Line #3 Code Line #4 Code Line #5 GoTo ResumeHere: Code Line #6 Many Thanks Ross Crill

Write to File - but just once per minute

Hi All, I am writing select data on my trades to a .txt file. My EA operates at the tick level. I calculate the current server time at the minute level = CMinute. At minutes 5,15,30,45,59, I want to " write to file " only once during that minute. I am currently posting, say on CMinute = 15, from

Factor to convert Pips to US Dollars

Hi All, I would like some code or function to get the Factor for any currency pair . I would use the factor to calculate the dollars of Profit/Loss for any given Lot size. For Example: Currency: EURUSD Lot Size: 1.0 Pips Move: +100 CalcDollars = 100 * (Factor @ 1.0 Lot) If calculated Factor =

Code to Calculate Total Profit on All Open Trades

Hi All, I am looking for some code (or Function) that will Calculate, in my Expert Advisor (MQL4), regardless of which currency I am looking at, the Current Profit on on All open trades. For example: Curr1 = 500 Curr2 = 250 Curr3 = -250 Comment ( Net_Profit on Open Trades = $500 ); Many Thanks

Reading a Text File - Can't Read the Entire Record

Hi All I have a text file the has one record in it with two pieces of information: 5W;100 My read function is only returning "5W" and I want if to return(read) 5W;100 so that I can parse the information from the whole string. My Question is: How can I read the whole text file record and not just to

Read / Write to/from External Files

I am designing a robot in MetaTrader 4 that will trade 7 currencies, at a time. I want to make a B (Buy) S (Sell) or W (Wait) decision in the Current (1 of 7) currencies based on the current signals from the BSW signals in the other 6 currencies. The way that I set it up, each currency has a small

IHighest / ILowest Not Working

Hi All, I am having trouble IHighest / ILowest to get the Correct High and Low Prices: Part of the problem is that I am working with a 1 MIN Chart and I need the Highest high and Lowest low in the last 31 Days. My code works on a Daily Chart but not on a Minute chart. Here is the daily code that