Is it possible to have a dropdown list for inputs?
-
Is it possible to have a dropdown list for inputs?
I would like the input to have a dropdown list from which I can select only one of the pre-decided value.
-
Only native enumerations. For example, if you define some Constants with ENUM_TIMEFRAMES type, it will have this dropdown.
-
@fxDreema
CAN YOU show example ?
I used this but not work
input string timeframe = "ENUM_TIMEFRAMES"
Thanks -
read my replies, I replied this somewhere few times

-
@miro1360
Please write link
Thanks -
it were to easy for you if I made search in my replies instead of your work?

try this:
input ENUM_TIMEFRAMES timeframe = PERIOD_CURRENT -
Excellent , Thanks so much
(you have 85 pages and no search link https://fxdreema.com/forum/user/miro1360 !! it is near impossible to find
)
Thanks again
-
its like cookery book now without index

just cook everything, one after another and you become culinary art
-
Hello again

Please let me know how can i use dropdown list for buy or sell money management ?
i find ENUM_APPLIED_VOLUME in reference but not true and can not find any other things !
Thanks -
for this I dont know simple solution without manual adding enum things into code (if drop-down is must) ...
but if you dont need dropdown and simple text is enough, than this:create inputs and add them into each management mode:


when you are complete with each mode, add management as input:

and than these text values are names of modes which you add into expert properties manually in this order:
fixed
equity
balance
freemargin
block-equity
block-balance
block-freemargin
equityRisk
balanceRisk
freemarginRisk
fixedRisk
fixedRisk
1326
dalembert
fibonacci
labouchere
martingale
sequenceand you change it with typing as this in EA:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
in case you need it as dropdown list, this is manual editing/adding in code:
in fxdreema this:

this:

this in on Init section:

generate only mq4 (not ex4)
with metaeditor add this enum structure into top of code above inputs:

click compile button in metaeditor and hopefully it compile without errors, this is result:

problem with this manual editing in metatrader code is, that each time you generate mq4 code from fxdreema, you need do all manual changes in code with metaeditor again and again
- and this is why it is not very elegant -
@miro1360
Thank so much
-
Put the changes in an mqh file and in any custom block you can include the mqh
-
Hi,
Today there is no solution supported by fxdreema?
thanks
-
Thanks To You .. this is working very Well
-
I want to be able to have this auto-update based on chart symbol since I would like to use this EA on 28 different FX majors/crosses.
-
Nevermind, I believe I figured it out using custom enumerations.