There is a setting "Reference price", maybe this is what you are aearching for
Posts made by fxDreema
-
RE: Finding the spread?posted in Questions & Answers
-
RE: Mark my tradeposted in Questions & Answers
There is no such thing in Buy now and Sell now and you are in fact the first one to ask me such question, but with "Draw Text" you can always put some text around the current candle or elsewhere.
By the way, just below "Draw Text" there is another block that should print those circles for trades on the chart, like the way it looks in the backtester... if this helps.
-
RE: Send Excel data to EA.posted in Questions & Answers
Well, calculations are normally done in indicators + the fact thet the result of these calculations can be printed as a line, histogram, arrows or something else. Even in the EA, if those calculations can be made in the EA, why not? I don't know why you are using this MT4 API, but do you really need it? Do you communicate with other MT platforms or servers or something else?
-
RE: Do you want "on Hold" event?posted in General Discussions
These days I was playing with this idea. And the idea is to hold on blocks until they pass. So, if we have "Condition" somewhere and it is reached, but at the moment it is false, on the very next tick to run this block directly and doing this again and again until it passes.
Why do I want this... because many people want to do it like this, like the way that is wrong in this example: https://fxdreema.com/demo/mt4-wrong-closing-rule
And I did it it 2 ways. It's interesting how the EA should behave if there is more than 1 chain of blocks. I decided that the best is if each chain of blocks is independent from the others and I now have this working, but the problem is that with all the control points that I have added to make this possible the result EA is working really slow

-
RE: Send Excel data to EA.posted in Questions & Answers
I'm actually scared to even try to make a block to read spreadsheets, mostly because they are tables with data, which this means arrays in MQL, and I hate the arrays in MQL

Damn, this MT4 API thing costs $450, I need to raise my prices
And I can't find information what needs to be added in the EA for this to work 
-
RE: Selection dropdown?posted in Questions & Answers
For these to show up, the data type of the Constant must be... let's say special. There is a big list of what they call "Enumerations", here is just onbe of them as example: https://www.mql5.com/en/docs/constants/ ... t_position So, the data type here is this one ENUM_CHART_POSITION and if you use this as a data type for a Constant, it should create a dropdown list with 3 options in it.
Also, custom Enumerations can be created, but even I am not using this functionality in the code of fxDreema. Here is more: https://www.mql5.com/en/docs/basis/type ... numeration
-
RE: Close trade using ticket numberposted in Questions & Answers
"For Each Trade" already loaded that trade and it can be closed immediately, just use "close" (one of the pink blocks)
-
RE: Selection dropdown?posted in Questions & Answers
If you want to put such thing on the chart, I'm not sure that MT4/MT5 can do that, at least I can't find something like this in their list of objects: http://docs.mql4.com/constants/objectco ... num_object
If you define "Constants", they will be also input parameters of the EA. In the builder, let's say under "on Init", depending on the value of the Constants you can modify some Variables. Variables and Constants are both global variables, but Variables are hidden from the outside world.
-
RE: Condition for Indicator With MAposted in Questions & Answers
If there are 2 or more indicators, just put "Condition" blocks for each of them
-
RE: Close trade using ticket numberposted in Questions & Answers
From where do you get that ticket number?

-
RE: Filter newsposted in Questions & Answers
You want to see in the future what the news are and then do something in the current moment? I don't know what you are using to get those news, but let's say that it's some custom indicator. If the indicator is built that way, you can use negative value for "Candle ID" and get data from the right side of the current moment. Ichimoku is such indicator.
Otherwise... in theory, only because we already have the history data, the EA can read the history files and parse them, but I don't know how exactly this is done and I have no ideas to do something like this at all. I think that only some EAs does that to fake their results, but this is stupid.
-
RE: Wait for a while?posted in Questions & Answers
There is a block "Delay" that stops the whole EA for a while, but this one should be used for small periods of time.
This is different idea: https://fxdreema.com/shared/PeHT0Leze I wanted to make this as a block, but as you can see there are 2 parts of this: 1-where the delay is set and 2-where we check if the delay has expired.
-
RE: Send Excel data to EA.posted in Questions & Answers
There is still no block to read spreadsheets
But accessing files on every tick is probably not the best idea anyway. What are you trying to do? -
RE: Retrieve highest value forposted in Questions & Answers
There is nothing about this in "Condition" or as a block. I was thinking about this many times, to add something in "Condition" or to do it as a separate block, but there are downsides for both cases, so I don't know

The best way is to have a custom indicator that does this calculation and also draws the values you want to use. Indicators do their job better. Doing indicator's job in an EA is not very efficient in most cases. Just imagine - getting and checking the same 30 values on every tick.
-
RE: Close the least profitable tradeposted in Questions & Answers
Yes, it looks at the profit in money.
If I ever do something about this, it will be some universal way of sorting, but I'm still not sure how exactly to do it
-
RE: How to create a horizontal 'ray'?posted in Questions & Answers
Trendline where it's 2 points have the same Price values and different Time values. For trendlines there is some "Ray" option that controls how the line looks beyond it's points. Here they have the parameters explained: http://docs.mql4.com/constants/objectco ... /obj_trend
Trendline by angle... I don't understand it very well, but http://docs.mql4.com/constants/objectco ... endbyangle -
RE: Condition for Indicator With MAposted in Questions & Answers
https://fxdreema.com/demo/mt4-crossover-indicators
https://fxdreema.com/demo/mt4-crossover-priceThere are also 2 other blocks in "Conditions for Indicators" that have a liiitle bit different way of working - they detect the exact event when a crossover happens by looking at the value of the indicator in the previous tick and the current one. While the regular crossover in "Condition" looks at values from the current candle and the previous candle.
-
RE: Help with Drow Lineposted in Questions & Answers
I created this one for someone, it's something similar:
https://fxdreema.com/shared/I5mE6yHeb -
RE: Countingposted in Questions & Answers
I think that this is a job for some custom indicator. Expert advisors are really mostly to decide when to trade and trade, to deal with trades, lot sizes, stuff like that. Indicators are used to get the data from past candles and make it look different.