Formula with variable - EA gives up
-
I've been trying to make this work with a longer EA obviously but narrowed it down to this which still doesn't work.
The EA works perfectly for a a few bars but then stops for no reason, I haven't touched anything.
Thanks in advance for your help.
-
Also if I add a condition afterwards that checks if the variable "result" <1 (for example). I can watch the number as it happens on the chart drop below 1 but it never passes that block.
-
I don't know what happened to be honest. I got similar reports before, but I don't have any evidence that something is wrong with the EA. "Once per tick" is not needed by the way. Do you have some error messages in the log or something?
-
Thanks for your reply, I didn't think of that. Error is shown below.
Does this mean it's trying to divide nothing so throws the error? If I added an adjustment '+1' to the formula could this make it carry out a calculation even when it's trying to divide 0's...
-
Tried +1..... it didn't work
-
Ok so I've fixed that problem by adding a condition before the formula that checks the value >0. So that stops it from crashing.
My next issue is when I get a result from the formula, say '0.7' which is then printed as text on the chart. I've then added another condition saying 'if terminal variable "result" <0.8' but it won't pass. I'm using right operand, value is numeric 0.8
-
No no no no no, not Terminal variables again. Those variables are not those Variables. Terminal variables are something completely different. The short suggestion is - don't use them. To use a Variable in Condition, go to Value -> Numeric (or Text, or whatever), right-click on the field and select the Variable. Again, Terminal variables are NOT the same as those blue Variables.
-
Ahhhhhhhhhhhhh, thankyou your help is greatly appreciated and all is working.