Forum

Help with error on rectangle for EA - if expression are not allowed on global scale.. where does my curly bracket go?

Can somebody check my code and tell me what i need to change? My if statements are within the ontick function so i didnt think they were on the global scope... but without the closed bracket before the if statements i get alot more errors. 34 as opposed to 3 ha ha Thought Process based on previous

Trying to draw Rectangle for FVGs

I feel like this shouldnt be this hard, but i am just learning in my journey and trying to work out how to draw a rectangle when there is imbalance there. I know i could just use an indicator already in the market but then i don't learn anything. I have gone through the forums and tried to

How do i change this indicator code to make the HTF candle color based on bull or bear candle?

https://www.mql5.com/en/code/39683 this is an awesome indi for my strat as i can use these HTF candles over the top of my LTF chart However i need to know whether the HTF candle is Bull or Bear ... and this just paints it all red i think i need to change these but im not sure what exactly i need to

my strat tester is showing bollinger bands but my EA doesnt have bollinger bands

how do i remove these? My default.tpl doenst have bb My tester.tpl doenst have bb My source code doesnt have bb but my EA is showing bbs which makes it difficult to see the zigzag ea im using

trying to draw horizontal line for opening price of range

hey there, i am trying to work out how to draw a line on the opening price of a range i have defined in my EA. I am able to draw the high of the range in green, the low of the range in red... but i cant figure out how to draw the actual opening price so i understand the concept if the lastTick.time

strategy tester from terminal mac

has anybody successfully been able to run the strategy tester on mac from terminal as if it was running from command line on windows? I can open MT5 by typing p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures} open

python metatrader5 initialize error

Hey there, i am trying to get python to connect to mt5 when i initialize it, it wont login to my account (i have checked the login and password for the demo account a few times) if i use this code to initialize, i get this error code # establish MetaTrader 5 connection to a specified trading account

MT5 on VPS wont connect to the market even though im logged into the community

For some reason I keep getting errors when im trying to connect the MT5 application on a VPS to the Market. I have checked and I am definitely logged into the community it even said activated for my account and no balance it literally states failed to connect to server and no data and failed to load

EA wont take trades - unsure where i have gone wrong exactly

Can you please help me identify where i went wrong? i tried to combine 2 tutorials... an RSI where the EA will take a sell if price is above 65 and buy if price is below 35 max 2 trades at 1 time... and using calcLots to work out 1% of the account balance ... it wont take any trades when prices

30s Timeframe MA Cross EA - how do you pull tick data when you cant choose seconds in the enum_timeframes?

Im trying to make an EA as im learning to be able to place a trade on a 30s MA cross. I can make an EA that can trade based on MA crosses but the second time frame is super confusing. im a scalper so the 30s timeframe is great and i use tradingview, but i was wondering if there was a way to make an