@Nils what are you trying to accomplish with the delay? Why is it in last place, after everything is done?
Posts made by roar
-
RE: delay blockposted in Questions & Answers
-
RE: Filter for SPECIFIC days of the month?posted in Questions & Answers
It signifies a function. Sometimes you need to put stuff inside the parenthesis, sometimes not, depending on function. But functions always need them to identify as functions instead of variables.
I will write a more detailed example in a custom mql code block, but you will have to troubleshoot it from there (using the Print() function for example)
datetime time = TimeCurrent(); string timestring = TimeToString(time); int day = (int) StringSubstr(timestring, 8, 10); Print(day); Print("Today is " + day + "th day of the month"); -
RE: Filter for SPECIFIC days of the month?posted in Questions & Answers
@GTOAT777 well TimeCurrent() will get you something like 2015.01.01 00:00 - then you can transform it into a string with TimeToString() and then you can take a StringSubstr() to get only the date.
Maybe there is a simplier option too, but this should work.
-
RE: First Attempt at Arrays. Could use an expert opinion.posted in Questions & Answers
@MrDaisyBates here's some more points:
- yes, you can add "== true" to the custom condition
- when mql4/mql5 code is compiled into machine code, all spaces will be removed in the process. So you can put as many spaces as you like, wherever you want.
- if you dont know how big your array is going to grow, you can do as you described: resize the array by +1 and then add your element to the last place
- mql5 has a nifty function to remove one element from the middle of an array, and then combine the tails together again. You can use this in a custom mql code block. On mql4, you have to reconstruct this function with multiple ArrayCopy phases. It is also possible to just set the "disabled" elements as 0 or -1, but you should make sure your array doesn't grow too big, it will start affecting performance at some point. https://www.mql5.com/en/docs/array/arrayremove
I'm not sure what other questions I should answer, maybe you can list them again

-
RE: First Attempt at Arrays. Could use an expert opinion.posted in Questions & Answers
@MrDaisyBates said
And greetings from a different part of Finland. Hahaha. I've noticed you seem to be Finnish. I'm American, but I live in Finland (my wife is Finnish). Anyways. Sorry. Lol. I know. Off topic.
Oh hello there neighbor ':D

-
RE: First Attempt at Arrays. Could use an expert opinion.posted in Questions & Answers
@MrDaisyBates said in First Attempt at Arrays. Could use an expert opinion.:
Was I correct to do this?

This one works, but if you want to look smart and techy, you can also use the other condition block and just set your boolean array as the condition itself:

-
RE: First Attempt at Arrays. Could use an expert opinion.posted in Questions & Answers
Hi @MrDaisyBates!
If you were coding in pure mql5 there wouldn't be any problem, but the "blocky" nature of fxdreema requires some extra consideration: when you declare variables in a "custom mql code" block, those variables are usable only inside that block - they are not global.
You can declare them globally by using your Variables menu:

After deleting block 16 and declaring the variables in Variables menu, there's just 2 errors, seemingly typos.

In these situations it often helps to download the .mq5 and try to compile it in your own MetaEditor. Now you see the error line, and somewhere above that you can always see the fxdreema block number.
https://fxdreema.com/shared/CfH27QXP

-
RE: EAS AUTOMATION PROBLEMS "STATUS"posted in Bug Reports
Then your "once per bar" filter cannot be before any conditions. Place it just before buying.
-
RE: EAS AUTOMATION PROBLEMS "STATUS"posted in Bug Reports
@basque007 what do you mean the EA is not working ok? Both locations for the "once per bar" are functional, it just depends on your strategy. Do you want to check your conditions once per day, or do you want to check them continually but only trade once per day?
-
RE: How to do I build a multi timeframe\symbol portfolio?posted in Questions & Answers
@MrDaisyBates the loop works as you described in the upper part of you reply.
It doesnt automatically break if the array range is exceeded, but when you set "Cycles" to ArraySize(), this shouldn't be a problem.
-
RE: EAS AUTOMATION PROBLEMS "STATUS"posted in Bug Reports
@basque007 the EA probably has some other error
-
RE: How can a button's backgorund colour be changed?posted in Questions & Answers
@l-andorrĂ if all else fails, you can use mql code:
ObjectSetInteger(0,"objectname",OBJPROP_BGCOLOR,clrRed);
https://docs.mql4.com/constants/objectconstants/enum_object/obj_button

-
RE: EAS AUTOMATION PROBLEMS "STATUS"posted in Bug Reports
@basque007 I dont think there is anything wrong.
"waiting for tick" = EA has just been placed on a chart and it has not recorded any tick
"working" = the EA has began its normal working processIf you look in the source code, you see the "waiting for tick" is the initial status

-
RE: How to do I build a multi timeframe\symbol portfolio?posted in Questions & Answers
Hi @MrDaisyBates! I'm not subtracting one off, I'm setting its value to exactly -1. Furthermore, the white section executes only once, even with loop blocks. Orange section executes for each loop iteration.
So effectively the loop_id is -1 before the loop starts, and it will be 0 when the loop starts working with the array. You need to start at 0 with arrays.
-
RE: How do i structure Grid Gradation settings without pending ordersposted in Questions & Answers
Use the positions loop to get the open price of 2 latest trades-> open new buy trade when price is above latest trade open plus 1.1 (or whatever) times the difference between 2 latest trades.
-
RE: Problem with variable string arrayposted in Bug Reports
It seems the Value field automatically escapes any quote marks, because normally you only write the text for string variables and fxdreema itself takes care of the quotation later.
Try declaring the timef array as an empty array first, and then populate it separately in a "custom mql4 code" block
-
RE: Poor countries, poor peopleposted in General Discussions
What an interesting thread, couldn't agree more with the admin.
-
RE: Opposite direction trade with specific entryposted in Questions & Answers
The low of latest candle may be above or below your entry price. So you will end up with a negative (impossible) SL and lot size.
-
RE: Delete Pending Order After One Other Pending Order Has Been Triggeredposted in Questions & Answers
@Michael-Alex try these 2 blocks:
If trade -> Delete pending orders