Here is my question: is there any strument in Jforex that permit to assign an initial value to a parameter?
I will explain better with an example: Imagine to have the following simple algoritm: If the "last trade event" is SELL, than ... else ... But "last trade event" is an only read variable and at the begining, has no value. So, I have to make a block that discern the initial situation when "last trade event" have no value from no initial situation when "last trade event" have a value due to an existing last position.
My questiotn is: how to implement the "If block" that choose the this flow? Thank you in advance.
In my opinion, the solution is to have a "memory variable" which is not affected by a "On Candle" start point. I already have tried an IF block with "All Positions", another read only variable which have null for initial value, but this variable don't work because seems to count only pendings and open positions but not the closed positions. (I deduce this because the variable's value oscillate from 0 to 1). I think that an internal loop is a good solution, I have to try it, but I wish to know if it is the only one.
Thanks in advance.
amine_chourou
Post subject: Re: Is it possible to create a memory variable in Jforex?
According to my understanding, you are looking to identify whether a variable gets attributed with a given value before using it. This is basically possible, if we use your example based on trade event it will look like this:
the IF block used with "NoValue" variable will filter out any flow without data. Hope this help
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
GammaBurst
Post subject: Re: Is it possible to create a memory variable in Jforex?
Hi! Thank you very much Amine! The solution was simple, I thought that the variable didn't exist while the algoritm assign it a value for the first time... I haven't already try your solution but I thinks it will be all ok