Forum

FileIsExist always defaults to File exists already! what am i missing?

I am trying to use FileIsExist to search the common directory of MQL, which is, C:\Users\Jim\AppData\Roaming\MetaQuotes\Terminal\9B101088254A9C260A9790D5079A7B11\MQL5\Files. In the code below, it always defaults to the "else" statement even if the file does not yet exist. if the file does not exist

compound ! statement not working

Hi gurus, i want to isolate a special case so that when it is true, the entire if statement becomes false and is not executed. if ( (( A && C) || ( B && D)) && !( A && B) //i want this to falsify the entire "if" statement when A & B together are both true. ) .... but

Can someone explain why adding "||" options kills original trigger

Hello gurus, my original line of code which triggers entry nicely in Strategy Tester as follows : //my trigger for ENTRY ... && (gCurrentPrice > gPbarEntryLow ) && noOfLadders < 0 ...etc. when i run it again after adding || options to increase number of potential trigger

any way to store expression into a variable or array?

Hi gurus, I want to be able to test my conditions (expressions) and know which one of them triggers the trade in an if statement by printing out the trigger expression when true. so i tried assigning the expression to x and then print x if it is true. However, since x is a bool, the final output is

Indicator value not being translated correctly

Hi Gurus, appreciate any assistance! if (ATRCurrent <= 0.115 && ATRCurrent >= 0.093 ) pATRStrength = "VIX REVERSAL" ; else if (ATRCurrent <= 0.092 && ATRCurrent >= 0.070 ) pATRStrength = "WEAKENING VIX-TREND" ; else if (ATRCurrent<= 0.069 && ATRCurrent >= 0.047 )

Outer [if] statement is false but inner [if] gets triggered

Hi Gurus, appreciate any pointers! Why does inner [if] statement trigger when outer [if] is false? i have a series of [if],[else if] statement with this one having an inner [if]. i know the outer [if] is false because the global variable "Proclivity" is not being changed when i print it out: //the

EA instance limit

Hi, i've dragged and dropped an EA on several, around 10 different chart instruments. I read that the limit is a lot so this limitation should not affect me. However, i am seeing that my EA robot triggers only on one chart while it doesnt trigger on other charts which have reached the same indicator

Flow control using char variable

Hi, i'm setting "alertswitch" to a number and using this to control the flow as in the example below. : but it is not repecting the alertswitch global variabl even when i printed it out it is clearly set to 3. The EA just bulldozes its way to the next line of code as if the alertswitch !=3 is not

Strange Output : char Variable driving me insane!

Hi all, i'm defining flag variable called char "alertswitch" from 1-10 with their corresponding negative nos. for short positions. I do this in order to identify certain conditions have been met processing and for documentation purpose. when i ran it inside my function below, it keeps on generating