@jstap I think I found the error... might help if the variable code matched the global variable
(fixed it)
Now shouldn't this produce a value/number and not the text code? I'm thinking it still won't work because we are comparing "CSM-1-H1-USD" > 50 ?? Shouldn't there be a value to compare to >50?

Posts made by Sauce
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap still can't get it to work for some reason. Variables with text code input as you said, but won't draw text.
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap I've used this indicator previously, so I already know it works correctly with >50 with manually saving 28 different EAs according to each pair. Takes forever to update every block with a pair's base and quote currencies!
I'm trying to simply make CSM-1-H1-AUD change the AUD part to whatever the current chart's Base currency is and for CSM-1-H1-CAD change the CAD part to whatever the current chart's Quote currency is. I am trying to avoid saving 28 unique versions of the EA to specify each pair.
"once this is working you will know what to do to use the global (terminal) variables... you then could add custom code to get the descriptions you need into a variable" -- I do not know what to do.
can you please show me one example of the coding and block setup for both a Base and a Quote currency and I will duplicate the rest of the timeframes?
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap this is what I see for Global Variables when press F3
Do I need to put these all into Terminal Variables?

-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap I'm sorry, I'm not sure what you mean by set global variables? Can you show me an example via the shared project above? I figured I'd at least start the shared project and see if you could revise it. (I'm not trying to have you do the work for me, but I'm certainly lost at this point and need clear examples/directions).
here is a link to the CSM custom indicator for future reference anyone that comes along looking for it: https://www.forexfactory.com/thread/852082-csm-indicator-hanover
Not sure if this would help at all, but this is part of the indicator's inputs...

-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap will this work? feel free to edit any mistakes.
shared project: https://fxdreema.com/shared/II6e2wU5c
UPDATE: it doesn't appear to be working, I'm lost again

-
RE: Is it possible to have a dropdown list for inputs?posted in Questions & Answers
Nevermind, I believe I figured it out using custom enumerations.
-
RE: Is it possible to have a dropdown list for inputs?posted in Questions & Answers
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.
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap I got confused with trying to add the timeframe which made it too complicated for me to be honest.
Will you please fix this if needed? I don't understand how the VARIABLE_COMP_CHANGE variables are working? What is the purpose of he TEST_VALUE as constant?I've tried my best here with my limited understanding of modifying variables. Please feel free to rearrange/optimize this since I really don't know what I'm doing lol.
SHARED PROJECT: https://fxdreema.com/shared/HUU0g5Cjc
You may have provided it already with other stuff added in, but can you show me just simply how to make it that the EA auto-inputs the Base and auto-inputs the Quote currencies into their respective "CSM-1-M1-(BASE)" and "CSM-1-M1-(QUOTE)? I will manually update the timeframe in the code input instead of making variables for each one separately.
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap OK Let’s do this instead… I will just create blocks for each time frame instead of doing multiple variables.
Can you show me how to have code input “CSM-1-M1-???” update the code input so that it updates the ??? with the base and the quote? (Forget about the timeframe)
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap okay thanks! Would I need individual variables for VARIABLE_COMP_CHANGE since each VARIABLE_COMP is now more specified?
I've created the individual VARIABLE_COMP variables as we talked about, but I'm confused on whether any other individualized blocks need to be created? -
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap so I tried to expand this across multiple timeframes, but I feel like there is a better way to do this than having 20+ variables? I'm trying to check each timeframe to make sure they all agree with each other (i.e. Base >50 and Quote <50 across multiple timeframes).
I figured I need multiple variables to specify the Base or Quote AND each timeframe combination, but I imagine there is a better way to specify without loading multiple charts and different timeframes or having 40+ variables for each TF and Base or Quote check combination?
Can you show me a better way to do this?
Shared project link: https://fxdreema.com/shared/VVRdXGxRd
Screenshot:


-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap can you show me how to create a new separate variable for the quote currency? I tried to create a new one as you said but am not sure what else would have to be created/linked for CSM-1-TF-+Quote Currency too. I got confused.
I'm pretty sure that's the last thing needed and we are good then!
Thank you so much for your help with this, I've definitely learned a lot about using constants and variables together. -
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap Also, not sure what you mean by "They both get put into a variable, so to use/reference either just use that variable (just re type the name)." Both the Base and Currency should be used since #1 condition block uses Base and #2 condition block uses Quote. Are you saying to add another Variable under Modify Variables block and call it something like VARIABLE_COMP2 and copy/paste/edit the Text (code input) to be: CSM-1"+"-M"+TF+"-"+Quote_Currency;"
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap I guess one question I can ask now is the Test Value constant. The rest I believe I can understand. Is that test_value = 20 just there so that the VARIABLE_COMP_CHANGE and the VARIABLE COMP are different values for the #10 condition block?
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap okay no problem. I will save my questions until next week when market is open and I have had a chance to see it work. Thank you so much again for the help with this, you have saved me countless amounts of hours of work.
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap wow, great work. Can you explain how this is working?
Also, I see the +Base_Currency for the variable name, great, but there needs to be a +Quote_Currency too since it will compare both any pairs that contain Base or Quote currency (not sure if thats already updated via a variable and I may have missed that though).
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap Thank you so much for this help, I'm almost there, but still a little confused with the custom code block.
Here's a screenshot of what I have so far and some questions. I've also included a screenshot to a previous older thread about integrating this indicator. It appears @MIKI tried something similar, not sure, just figured I'd pass this along if it helps.
All I need is for that Base and Quote currency to update automatically in the variable name block with the CSM-1-M1-___
Here's the new shared project: https://fxdreema.com/shared/Ztakcuj6e
SCREENSHOT 1

SCREENSHOT 2

Thank you again for your help, it is greatly appreciated.
-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap so here's everything altogether and how it works.
I'd to be able to have one EA file that changes depending upon what currency pair is on the chart. Instead of having to save unique EAs for each individual pair because I have to manually change what currency each variable is fetching. (i.e. CSM-1-M1-AUD is fetching only M1 AUD value from the text file).
I had help creating this system from @miro1360 awhile ago, but it would be nice to have the EA have an constant/input setting that I can change the pairs' variable name that way automatically from whichever Pair and Timeframe is currently on the chart. Hope that makes sense!

-
RE: Using a Constant within a Terminal Variable nameposted in Questions & Answers
@jstap sorry, I'm totally lost... is there a simple way to have the variable name be able to be changed via a constant input in the EA settings? For example, change any terminal variable with AUD to whatever pair is selected from a list in an input setting?
This indicator already writes values to a text file I believe and calls on those text files according to name "CSM-1-M5-AUD" for instance. There is also another block with a variable "symbol"

Not sure if that helps at all? I just want to be able to change the timeframe and pair for each terminal variable instead of having to manually change over 100 blocks. Is there a way to code it so that it looks at whatever symbol is on chart? For example, if I run the EA on NZDJPY, the AUDCAD variables could automatically update to the chart's pairs?? That would be ideal so that a single version of the EA could be adaptable automatically to what timeframe and pair it is currently on.