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
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
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
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
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
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
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
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 -
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
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
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
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
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
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
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
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
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=
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
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