- Search Energy EXCH
-
kennyhubbard replied Apr 4, 2021What kCBHk said..... In fact negative rates often 3x or 4x the positive rate and even 10x when you start looking at some exotics. Just one of the reasons why hedging is such a silly idea. You will pay daily for the privilege of holding a hedge ...
Swap costs on hedge trades
-
kennyhubbard replied Apr 2, 2021I haven't analyzed in depth. Debugging is always a process of elimination. In order to debug effectively, you should use lots of print statements, rather than just trying to deduce what is happening. As an example, this line of code :- is wrong. ...
What does “warning: not all control paths return a value” mean?
-
kennyhubbard replied Mar 30, 2021Nope. MT4 is still going strong and will be around for a while to come.... Had it happen once or twice. Chances are your MT4setup.exe file is outdated. Try downloading the latest version from your brokers.
Is Metatrader 4 dead?
-
kennyhubbard replied Mar 30, 2021bool TradeEntry(int Type) { if(Type == 0) { double BTP = Ask + (TakeProfit *Point); double BSL = Ask - (StopLoss *Point); if(OrderSend(Symbol(),OP_BUY,0.1,Ask,10,BSL,BTP,NULL,0,0,clrBlue)) { return true; } else { return false; } } if(Type ==1) { ...
What does “warning: not all control paths return a value” mean?
-
kennyhubbard replied Mar 30, 2021It's asking you what to do if (Type==3)......or any value other than 0 or 1........you may know 0 or 1 as buy or sell and know that it will never execute the function with something other than 0 or 1 but the function doesn't know this. Place a ...
What does “warning: not all control paths return a value” mean?
-
kennyhubbard replied Mar 30, 2021Michael, read what the actual warning says.... Ordersend returns the ticket number when the trade is executed or -1 if it fails. You really should check if your trade was successful or not(by assigning it to a variable). MQL recognizes this and ...
Warning in MT4 code
-
kennyhubbard replied Mar 26, 2021There are several issues here. First off, avoid using names like init and start because they are similar to the OnInit & OnStart functions found in an EA and a script. init is ok but try use a descriptor so int file_init would be a good way to go. ...
Efficiently reading a csv file?
-
kennyhubbard replied Mar 19, 2021This script will print a list of symbol to the Experts tab..... //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void ...
How to remove symbols (pairs) from the market watch for good?
-
kennyhubbard replied Mar 19, 2021Yes, you can find out what is in the marketwatch window.....depending what you mean by that. You use the SymbolSelect command to hide or show the symbols. A simple query of any contract specification, including the price will tell you if the symbol ...
How to remove symbols (pairs) from the market watch for good?
-
kennyhubbard replied Jun 22, 2011Fahmiyyz, I'm sorry, unfortunately not. That EA was designed specifically to produce only one alert......for obvious reasons I cannot customise all EA's for everyone.
I'm seeking a trailing stop EA that surely must exist, any ideas?
-
kennyhubbard replied Jun 22, 2011Hi guys, Attached is the latest version which incorporates the SL capability. There are 3 ways that it sets SL. First there is the straight forward SL in pips. Set this in the Manual_SL setting. Using Manual_SL = 0 will result in the EA setting the ...
I'm seeking a trailing stop EA that surely must exist, any ideas?
-
kennyhubbard replied May 28, 2011Ben, I actually have a version where the SL is incorporated. I am just ironing out one or two bugs and should post it during the course of the week. The TP will have to come later.........
I'm seeking a trailing stop EA that surely must exist, any ideas?
-
kennyhubbard replied Apr 19, 2011Hi Justin/All, Is it just me, or is there a difference between the marketwatch time and the orderopen time of each trade in MT4. When I make any trade, the order open time that appears is different to the market watch time by an hour???? This is a ...
MB Trading Futures - Introduction
-
kennyhubbard replied Mar 30, 2011Hi Justin, I refer to your post from 2 Aug 2010. I have a technical question for you wrt executions and fills, specifically when it comes to larger orders. I was told once by a broker that when they sign up with a liquidity provider for STP, they ...
MB Trading Futures - Introduction
-
kennyhubbard replied Mar 30, 2011No need to guess.......use GetLastError() and the experts tab will tell you what the problem is.
Code Problem: cannot type 2 ordersend
-
kennyhubbard replied Mar 21, 2011Yes, that is correct. No. If you want this EA to control your manual trades, set the MagicNumber to -1(for all trades) or to 0(for manual trades). All manual trades have a MagicNumber of 0 assigned by the terminal. MagicNumber has nothing to do with ...
I'm seeking a trailing stop EA that surely must exist, any ideas?
-
kennyhubbard replied Mar 16, 2011Yup, just got caught in a very nasty way with a long USDJPY........MBT managed to miss my stoploss by 112 pips

MB Trading Futures - Introduction
-
kennyhubbard replied Mar 9, 2011Hi Justin, Just another quick question..... Does the Pay for Limit Orders structure apply to Euro denominated accounts, or is it confined to USD accounts only? Many thanks Kenny
MB Trading Futures - Introduction
-
kennyhubbard replied Mar 4, 2011usasa, You may as well learn this now.........you are going to have grey hairs with this statement :- OrderClosePrice() == OrderStopLoss() You cannot compare doubles in MQL directly. This is due to the way MQL deals with floating point arithmetic. ...
Guide me in learning MQL coding