FMIC:
As far as I know "extern", "input" and "sinput" variables/properties can only be assigned constants and don't accept dynamic data (such as functions).
"extern" variables can be changed within an ea, indi, but "input" vars. can't.
As far as I know "extern", "input" and "sinput" variables/properties can only be assigned constants and don't accept dynamic data (such as functions).
gooly:
"extern" variables can be changed within an ea, indi, but "input" vars. can't.
"extern" variables can be changed within an ea, indi, but "input" vars. can't.
The discussion is about initial assignment, as macpee wants to set the default value presented to the user when the EA/Indicator is attached to a chart and the properties can be set by the user
He is NOT talking about changing the value after the fact!
macpee: The idea is to copy the current time from the CurrentTime variable and
paste in the EnterTime variable. By so doing, we will only have to edit
the minute and/or hour, and not the entire date
|
|
Thank you @EMIC, you got my point. The idea is more like presenting the initial assignment to the user by the EA via the properties window for copying purposes, and not to input the value by the user for use by the EA.
WHRoeder:
@WHRoeder, I think you got the idea. Moreover, you have proffered a solution to the issue. As a matter of fact the additional task of having to copy and paste dates from one property to the other in the property window is eliminated by your solution. However, suppose an eco data is to be released at 24:05, and the current time is 23:58. But you have to be quick in setting the time for the EA to take action during the 24:05. Also, you know the two times are in two different days. It means that you will have set a time in the past (elapsed by 24 hours) during the eco data time.
macpee: The idea is to copy the current time from the CurrentTime variable andpaste in the EnterTime variable. By so doing, we will only have to editthe minute and/or hour, and not the entire date |
|
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, comrades. How can I set the current time as default time to appear in the property window for a variable I created to handle time in the property window, without having to enter the current time in the editor each time I want to invoke the property window? Thank you in advance.
Please see code below:
An idea struck my mind to to do the following:
If this works, it should give me what I want. However, I have not executed it yet as the market is closed as of now (weekend).
Your suggestions will be highly appreciated.
You might be wondering why I want the current time in the property window. Well, to clarify such wonder, I have another variable called EnterTime, to enter a future time. The idea is to copy the current time from the CurrentTime variable and paste in the EnterTime variable. By so doing, we will only have to edit the minute and/or hour, and not the entire date. Unlike the chart, it is possible to copy values from the property window.