Work with more horizontal lines
-
Hi fxDreema,
I need to work with more and more horizontal lines, i need to open a position when a candle closes with:
Candle low "=>" (or ">=") Red or Lightblue horizontal line.i tried to use the name, but the lines name are red1, red2, red3, [...] red45 etc...
now, how i can do? I tried with Condition:
Candle 1 Low <= Object Attributes (numeric) Object name Red but it doesn't work...
-
What the hell is that, why so many lines? Something tells that whatever you are doing can be made is much simpler way
-
if you will it make so complicated, think about counters and increment variables, but that is not easiest if you have not doing it before ...
-
I create this because otherwise i need over 90 variables and "Once a day" reset all... Is a true long work, how i can do?
-
I don't mean using variables instead of horisontal lines, but doing something that does not require so much values to be saved.
Anyway, if you draw any object with "Draw..." blocks, be careful with the first 2 parameters in each of these blocks. They control how many object can be created by the same block and their names also. Take a look at the names behind the objects on the chart - are they as you expect? If yes, then you can read those objects.
If you have names like red1, red2 and so on, and you want to read the latest object, this is the way: https://fxdreema.com/demo/mt4-object-in-loop
But note that objects are sorted by their name, not by date. And I know that the sorting can be wrong sometimes. It would be like this - red1, red10, red2, red3....
Once I was trying to fix this behaviour, but I think that I failed.