change marketposition

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

change marketposition

Postby shivax » 05 Feb 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: 31 Mar 2017
Been thanked: 1 time

Re: change marketposition

Postby Wapi » 06 Feb 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: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: change marketposition

Postby Anna MultiCharts » 06 Feb 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.


Return to “MultiCharts”