Toggle between trading strategy
-
Hi again,
If want to create 2 options of trading, how should I program it so I can toggle between them?I have 1 system say for conditions1, and other for conditions2. Should I just use the "toggle blocks" fuction on top of them and connect them, and just put the 2 blocks ID number in it? Then in settings I just have to select ID1 or ID2 to make it work with either of them?
What is the "change status to" for within toggle option (and all function options)?
Is it possible to select the above mentioned trading option with a real name from a dropdown menu instead of typing the ID number?
I also want to ask how to create an additional signal filter, but that can be turned on/off or yes/no from the EA settings?
Thanks
-
It depends. There are multiple ways to store state in the memory and then check it. Variables, Flags, Toggle blocks. All of these are doing the same stuff deep down in the code - setting value in a variable and then reading it's value. Do it in the way you prefer.
Status is this blue text near the spread meter on the chart. What it says can be changed.
Block numbers can also be text values, but use only letters, numbers and/or _. Don't use empty space or non-latin characters.
Here is about EA settings - https://fxdreema.com/demo/mt4-constants
-
I'm trying to use the constants example you sent, but it doesn't compile, send this error:
input double inp0_ProfitMoney = c::DayTarget;
I assume it is the input type, that by default fxdreema uses "double", but not sure if I should change it to another type in the editor, or how to do so in fxdreema?
By the way... when you right click on a block, there is an "ON/OFF" option that if selected puts the block in red. What is this option for? Does it enable an "ON/OFF" input for that block in the EA settings, so I can turn it while running the EA? This way can I toggle strategies?
Thanks and regards
__It depends. There are multiple ways to store state in the memory and then check it. Variables, Flags, Toggle blocks. All of these are doing the same stuff deep down in the code - setting value in a variable and then reading it's value. Do it in the way you prefer.
Status is this blue text near the spread meter on the chart. What it says can be changed.
Block numbers can also be text values, but use only letters, numbers and/or _. Don't use empty space or non-latin characters.
Here is about EA settings - https://fxdreema.com/demo/mt4-constants[/quote:2kkpr323]
-
Don's check the checkbox (on the right side of the parameter) while a Constant is used for this parameter. Just uncheck that checkbox... or all of them
https://fxdreema.com/demo/mt4-disable-blocks