Can you please check if this version is close, it is at least refreshing and seems better.moey_dw wrote: Tue Jan 02, 2024 6:57 pm In the Pinescript book the:=
is called the reassignment operator which is used to assign a new value to a previously declared variable.
SYNTAXEXAMPLECode: Select all
<var_name> := <new_value>
Does this help us at all?Code: Select all
//@version=5 indicator("My script") myVar = 10 if close > open // Modifies the existing global scope `myVar` variable by changing its value from 10 to 20. myVar := 20 // Creates a new `myVar` variable local to the `if` condition and unreachable from the global scope. // Does not affect the `myVar` declared in global scope. myVar = 30 plot(myVar)
Attachments forums
Re: Trend Direction Force Index Indicators MT4
mrtools, Tue Jan 30, 2024 4:53 am