Page 1 of 1

change marketposition

Posted: Feb 05 2018
by shivax
hi, there is a instruction to code a change position?

Example : (i want to code it more easy)

var: lastPos(0);

if (marketposition<>lastPos) then begin
//do instruction

end:

lastPos=marketposition;

Re: change marketposition

Posted: Feb 06 2018
by Wapi
Isn't enough to declare:

Var: lastpos(0);

lastpos=marketposition;

If lastpos<>lastpos[1] then begin
....
end;

????

Re: change marketposition

Posted: Feb 06 2018
by Anna MultiCharts
Hello, Shivax and Wapi!

Both of the codes seem to be fine.
Shivax, we cannot recommend anything regarding an easier code as it all depends on your goals. Please describe what you need to achieve in more details.