- Search Energy EXCH
-
kennyhubbard replied Aug 3, 2010Mike, I am still stumped as the code works just fine on my computer. Have you tried a different broker? Anyway, refer to this post to download the latest version of the trailing stop which has built in trading logic similar to what you are trying to ...
My first Expert - Trouble with the code
-
kennyhubbard replied Aug 3, 2010Ok, try this out, You need a reliable slave terminal preferably to another broker. The settings as follows :- Master - set to true for the master terminal(presumably the one being monitored) and set to false for the second terminal. Warning_Time - ...
How to tell if MT4 loses its connection
-
kennyhubbard replied Aug 3, 2010Hi supremeChaos, When I first started(and still today), am just happy that my code works. With time you get to see what works and what not. I often cringe when I look at some of the code I wrote 6 months ago....... If you are just creating an ...
num_bar parameter
-
kennyhubbard replied Aug 3, 2010supremeChaos, I wouldn't really say that. I think the main reason indicators use more resources is simply because they provide output to the screen. Iterative functions are fairly quick, although needless ones will slow things down a tad, but ...
num_bar parameter
-
kennyhubbard replied Aug 3, 2010supremeChaos, Indicators are not really my strong suite and its a bit difficult to see exactly from the 2 pieces of code how the whole indicator is put together. The idea behind num_bars would normally be to limit the number of bars being calculated ...
num_bar parameter
-
kennyhubbard replied Aug 2, 2010Mike, What errors are you seeing in the journal and the Experts tab?
My first Expert - Trouble with the code
-
kennyhubbard replied Aug 2, 2010Actually seems to work ok.......did you by any chance change the MagicNumber in the external settings before running?
My first Expert - Trouble with the code
-
kennyhubbard replied Jul 31, 2010ticket = OrderSend(Symbol(),OP_SELL, Lots, Bid, Slippage, 0, 0, "Qbot-Alf", MagicNumber, 0, Red); if(ticket>0) { Print("SELL order opened : ",OrderOpenPrice()); if(OrderSelect(ticket,SELECT_BY_TIC KET,MODE_TRADES)) { OrderModify(ticket, ...
IBFX New Policy
-
kennyhubbard replied Jul 31, 2010I have been known to get this wrong, but the way I read it, the else statement is now linked to the if(Ticket > 0){
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010//+------------------------------------------------------------------+ //| Signal End | //+------------------------------------------------------------------+ //Buy if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars ...
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010It changes the flow of the program. The reason there is no entry in the experts tab is because of a bug, which is hopefully fixed now.
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010Why do I need to remove one of the curly brackets? I have inserted an extra one before the else statement. And do I still put another return(0); under the tickcheck and barcount? Yup, well actually, just leave the return that is already there in ...
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010When you replace the code with the last bit I gave you, you will need to delete one of the curly brakets just above the :- if (EachTickMode) TickCheck = True; if (!EachTickMode) BarCount = Bars;
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010It does it for both........ if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { Orders have numbers, so a buy = 0 and a sell = 1. This code says if your order type is less than or equal to 1, which covers both buy and sell. return(0) is used ...
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010This is a routine to run through the orders and check if they are buy or sell. You could possibly solve the issue this way, but it is sort of like treating the symptoms and not curing the disease.
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010Ok, try this........... Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue); Print("Sending order to the broker......"); if(Ticket > 0) { if ...
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010Sorry, at the risk of asking a stupid question, are you looking at the terminal on your remote VPS where the EA is trading from?
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010Have you closed the terminal at all since you took the screenshot?
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010The Experts tab won't say anything about the off quotes, but it should execute this line :- Print("Error opening BUY order : ", GetLastError()); So you should have a statement there saying that there is a error opening a BUY order and it should be ...
Coding EA to check opening price - How do I handle this problem?
-
kennyhubbard replied Jul 31, 2010You are half right, in that the order was rejected at the server. You have 2 tabs that tell you what is going on.....the Experts tab and the Journal. The journal tells you what is happening between yourself and the broker, but it does not tell you ...
Coding EA to check opening price - How do I handle this problem?