Forum

Not sure how to draw a box at the same time every day

I'm trying to draw a box at the same time every day. The start and end of the box will be at the same time but the top and bottom of the box will be of the highest high and lowest low during that time period, respectively. I'm still relatively new to writing code, which will probably be obvious and

Can I draw an object that extends beyond the current candle (into the future)?

I wanted to draw a box into the space that is farther into the future than the current candle with a script but it doesn't appear to be possible. I have a script to enter into a position and it calculates my entry, stop, target, and position size. I'm a visual guy and would love if it would also

I want this variable to hold information like a switch

I'm not sure how much sense that makes. I was under the impression that a boolean variable will hold its value until it is changed but that it wouldn't change automatically. Is this true? If when a specific criteria is met and a bool becomes TRUE, does it remain true until I tell it to become FALSE

A simple counter?

I'm trying to write the code that would count the times something happens. It doesn't matter what. You don't need any existing code. I'm just learning and trying to understand scope and the order that things are processed. It's all still pretty new. I just want to write, for example: if(a == b) { do

Execute code lines / Draw objects only once?

I'm frustrated because someone answered this for me but I can't find it in all my old posts and comments. I'm struggling to figure out how to run a segment of code only once, particularly when drawing an object. For example, if I create a bool variable for a MACD crossover and I want to draw an

IndicatorBuffers() ? Huh?

Everybody learns differently. I have access to YouTube and these forums and I even have the "Expert Advisor Programming for MT4" book that I refer to. It seems like nonsense that I would still struggle to understand such a basic concept. I know that. But that's all this is, is my lack of

I don't understand how to use this code I got on the forum.

I've been struggling to find out how to find the value of the upper/lower lines of the standard deviation channel at a given time so that I can code a break above/below the channel. I found the following code on the forum and I believe someone is trying to provide the answer I'm looking for but I'm

Can I add a number to change a variable name?

Sorry. I'm not sure how to articulate this. Can I add a number to a variable? So if I have a variable named double Wave1. How could I add a number to that to rename and create a new variable named double wave2

Is it possible to have an EA that can interact with manually added objects?

Is it possible to have an EA running that is told to enter a trade if price crosses the trendline named Alpha, for example then manually draw in a trendline later and simply name it Alpha? Could I potentially write the EA so that it enters the trade at that point? If so, does that mean a person

Simple enough, but Array Out of Range?

Really new to coding. MQL4 is the only thing I'm learning. Someone wrote me a code so that I could play with and experiment with some ideas I have. They did the hard stuff and created variables that represented the swing highs and swing lows on the price chart (H_Price would be a swing high price