Period() in once per minute will only work at the opening of a candle, once per bar can work once at any point
Posts made by jstap
-
RE: using turn on/off blocksposted in Questions & Answers
-
RE: using turn on/off blocksposted in Questions & Answers
When you say wait 1 bar do you mean x.xx minutes from turning off, or just when the new bar happens? Because this could be a second later?
-
RE: Can condition block parameters be put in variablesposted in Questions & Answers
Although it is written in text I don't think this will work, use the equivalent int numbers 0,1,2,3,4
-
RE: using turn on/off blocksposted in Questions & Answers
In your picture turn off - once per bar - turn on so turning off is pointless because you instantly turn it back on
-
RE: How to change time frame automatically when certain % drawdown is reached?posted in Questions & Answers
There are different ways, but this - ChartSetSymbolPeriod(0, NULL, PERIOD_H4); - added to custom code when you want the timeframe changed should do it. So when you have worked out the drawdown.
-
RE: EA NOT WORKING ON REAL OR DEMO AS IT WORKS ON TESTERposted in Bug Reports
Brokers do not manipulate trades, your account is well under the multi-million accounts others use, so to manipulate yours would mean risking not making money elsewhere.
-
RE: Can condition block parameters be put in variablesposted in Questions & Answers
In the link it shows you the int value for the type, so basically change the value in the variable, and the type in the block should change
-
RE: Can condition block parameters be put in variablesposted in Questions & Answers
https://docs.mql4.com/constants/indicatorconstants/enum_ma_method
You might be better to use the int value to select/change, the words work best for constants, if automatically changing, you need blocks (probably in a separate tree) changing this value as required. -
RE: using turn on/off blocksposted in Questions & Answers
You have blocks being turned on/off from the same condition, and because you have off as a lower number, this will activate before the on, meaning blocks will turn off, but almost instantly turn back on:

-
RE: A TimeFilter within a TimeFilterposted in Questions & Answers
Generally the longer time (in this case once per bar) would need to be under the other blocks.
-
RE: How to tell my bot to close all opened position once it has gotten to a certain profit percentageposted in Questions & Answers
If you want to stop EA from taking new trades if day profit is reached
-
RE: How to tell my bot to close all opened position once it has gotten to a certain profit percentageposted in Questions & Answers
What Landorra has shown does work, I don't use it because there is no start time, what you have is what I mean, what is not working?
-
RE: Can condition block parameters be put in variablesposted in Questions & Answers
Add that to a project, I will check and say if it's right. To modify set with a modify block, and above have blocks that tell modify to modify
-
RE: Can condition block parameters be put in variablesposted in Questions & Answers
Do you want something to change this or for you to be able to change in the inputs?
TYPE = ENUM_MA_METHOD
VALUE = MODE_SMA
name it what you want -
RE: Can condition block parameters be put in variablesposted in Questions & Answers
You can change the variable in a separate tree, so only one aspect is changed
-
RE: How to create trendline based robot and indicatorposted in Questions & Answers
Add the indicator into FX then you can select it in most blocks
