Forum

continue?

hi guys i always see codes with continue at the end. what exactly it does? i coded some not complicated EA but i dont used it. I try to read in google but i cant really understand why you have to put it. What help will it add on my EA? Here is an example if ( ( OrderMagicNumber() != magic25 ) || (

OrderClose sometimes randomly close my trades when changing timeframe

hi as stated on my title, I put a button that closes all my open trade at the same time when I press it, but sometimes when I change my timeframe in mt4 it randomly activate without me pressing the button, here is the code of my button if (id== CHARTEVENT_OBJECT_CLICK ) { if

don't wait for tick to calculate

hi guys I have a object Hline that gets the price value wherever i put the Hline on the chart then pass the price value on a label object to display its value. My problem is the value on my label only changes when my tick updates. I want it to get the value from my Hline instantly and not wait for

Total SL amount or TP amount depending on given Horizontal line price

hi guys I'm trying to make a label on my EA that will display the possible loss amount of my current open multiple sell orders. I have a horizontal line that will give the price, the price that was given by the horizontal line is will be used as Stop Loss price on my formula that will compute my

EA reset when I change time frame

hi sir have an EA that creates horizontal lines and create a button when initiated. If the button is pressed an order will open and all the horizontal line that have created upon inititating the EA will be deleted buy ObjectDelete. For example i pressed the button on 1 min TF it do its job making an

Obj_Hline Price

Hi guys I have a code the create horizonal line on chart, my problem is how can I get the price of where my horizontal line is located and save it to a variable, if I drag the HLine up or down the variable where the price is saved will updated. thank you

Magic Number for different chart

Hi guys I need advice on what to do with the magic number of my EA. When I start my EA I manually input the magic number that my EA will use, and when I use my EA to a different chart and input the magic number I add +1 to the magic number used on the first chart so the magic number that will be

Semi Manual EA

Hi guys i have coded EA trade management. It automatically set my trailing stops when it reach a certain percent on gain. To activate it i need to manually open a trade, after manually opening a trade i run the EA so it can adjust my trailing stops. It works perfectly on one pair. The problem comes

Panel buttons label and text

Hi guys i want to learn how to code objects on mql4. I want to createe buttons and panel on mt4. Like buy sell button, textbox where i can input lotsize that i want to use, inserting horizontal line and and returning and displaying the horizontal price on my panel etc. In short i want to learn

Steps on trading on a session

Hi guys is im coding an EA that will only trade on a given session but broker time local time and GMT is confusing me. Im making a function that will trigger my ordersend if the time hits a given session example new york session. Is this the correct steps i need to do? 1. Get broker timezone 2. Get