change marketposition

Questions about MultiCharts and user contributed studies.
shivax
Posts: 90
Joined: Sep 02 2013
Has thanked: 37 times

Feb 05 2018

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;

Wapi
Posts: 25
Joined: Mar 31 2017
Been thanked: 1 time

Feb 06 2018

Isn't enough to declare:

Var: lastpos(0);

lastpos=marketposition;

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

????

User avatar
Anna MultiCharts
Posts: 560
Joined: Jul 14 2017
Has thanked: 42 times
Been thanked: 141 times

Feb 06 2018

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.