Agent86
Added topic Multi time frame MACD trading when condition is false
Hi,  I'm experimenting with multi time frame indicators.  I want to trade when M5 and M1 agree IE these are both MACD M1 and M5:   if (faster_1 > slower_1 && faster_2 > slower_2) For some reason the M1 seems to just
Agent86
Added topic return value of 'OrderSelect' should be checked
In the past this code did not throw errors I understand the return value and wondered what changed to cause errors where none existed prior ?  Can anyone see fault with my highlighted solution code below. It's not throwing errors but is there a
Agent86
Added topic Why does compilers says "variable already defined"
Hi coders I get compiler error "variable already defined". Why Please advise Thanks void OnTick ()   { //---    int ticket,i,total,result;    total = OrdersTotal (); // same variable without errors here line 36, but not
Agent86
Added topic About time frames
Regarding indicators and time frames in the code. https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes EI: imomentum https://www.mql5.com/en/docs/indicators/imomentum Question: Where noted and regarding the time frames. What is
Agent86
Added topic Please describe "Arrays cannot be passed to Comment() Function".
Hi all, The value of my Comment doesn't change once it is initialized. I"m sure it has something to do with the docs below, but I'm not 100% sure because the Comment does initialize and show the value exactly 1 time then it's static from there on
Agent86
Added topic Can someone direct me where to learn about the roaming folder
I have not written anything in a long time and noticed no ea folder anymore. I read about a roaming folder so I'm assuming it's something I have to learn about. Just wondering how and where to copy ea's that I wrote in the past so I can make them
Agent86
Added topic WHY ? Trouble with custom indicators
Hi I have 2 buffers exactly the same except one is LOWER_MODE and the other is UPPER_MODE Alow() works fine while Bhigh() creates Meta Editor errors 'B' - some operator expected    ABCDtrade.mq4    116   
Agent86
Added topic How to proceed with learning to make custom indicators
I'm confused about what I should be reading Mql4 custom indicator properties vs Mql5 custom indicator properties.   When creating a custom indicator on mql4 it does indeed insert the OnInit() and OnCalculate() functions For example: From MQL5 -
Agent86
Added topic Question about Logical Operation OR ( ||)
Can I do this ? I want all of this || all of that if ((Alow()!= 0 && Bhigh()!= 0 && Bhigh() - Alow() >= minABrange*pips2dbl) || (Ahigh()!= 0 && Blow()!= 0 && Ahigh() - Blow() >= minABrange*pips2dbl)) I mean will
Agent86
Added topic help with mathpow()
MathPower() seems fairly straight forward I'm getting "empty controlled statement found" if(mlots >= MathPow(LotSize,3));
Agent86
Added topic Need help analyzing report
I don't know if this is good,bad or ugly I'm finally to the point where I can actually create an EA that does what I want so now I'm back testing and really don't know what to make of my testing. NOTE: I know martingale features are risky and
Agent86
Added topic why -1 and i-- insead of
for(int i = OrdersTotal()-1; i >= 0 ; i--) IMO it seems to miss the latest order everytime wouldn't it ? If OrdersTotal() were 4 lets say (4-1)=3 so the (i) would be 3 and the selected order would be -1 of the OrdersTotal or even
Agent86
Added topic EA not closeing trades
Hi all Please forgive the long SRC code Disregard most of these functions and variables they are not used and just stuff I wrote for learning. My Maclosetrade() function is not closeing trades when using Close[1] condition. However it does close when
Agent86
Added topic EA tester settings use date from ? to ?
I usually do no have problems with this but recently MY EA's testing will not go back far enough in history. Any idea why EA's randomly seem to disregard the EA date use settings
Agent86
Added topic Martigale function causing - error 134 (not enough money)
Martingale function causing - error 134( not enough money ) However, there is enough money. I tried increasing the expert properties deposit amount which had no effect I thought perhaps the loop was taking too long to find a LotSize So I removed the
Agent86
Added topic Can I use a function for lot size in OrderSend() ?
Is this not legal ? ticket = OrderSend(Symbol(),OP_BUY, martingale() ,Ask,3*pips2points,Ask-(StopLoss*pips2dbl),Ask+(TakeProfit*pips2dbl),NULL,MagicNumber,0,Green); The return value of the martingale() function will be a double Please advise
Agent86
Added topic Having trouble closing orders with OrderClose()
I do not know why I cannot OrdersClose() I understand the parameters which seem clearly defined in the documentation I am not getting any errors and believe the condition to close the orders are coded correctly. I have moved the function call around
Agent86
Added topic OrderClose()
I get this warning for OrderClose() return value of 'OrderClose' should be checked void macdclosetrade() {       double faster= iMACD ( NULL , 0 , 12 , 26 , 9 , PRICE_CLOSE ,MODE_MAIN, 1 ); //MODE_MAIN    double slower=
Agent86
Added topic Question about IndicatorCounted()
Hi https://docs.mql4.com/customind/indicatorcounted How does IndicatorCounted() know which indicator, if there are more then 1 launched on the chart; and what if they have different array sizes ? Will IndicatorCounted() handle this automatically for
Agent86
Added topic Tester: Cannot load Experts\
Won't test experts anymore as of today 9-25-14 Tester: Cannot load Experts\ Cannot open file 'C:\Program Files (x86)\OANDA - MetaTrader\MQL4\Experts\Daily Rat.ex4' [2] Any EA I try that were previously working are not able to load now. Please advise