change marketposition

Questions about MultiCharts and user contributed studies.
shivax
Posts: 50
Joined: 02 Sep 2013
Has thanked: 21 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: 6
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: 125
Joined: 14 Jul 2017
Has thanked: 4 times
Been thanked: 22 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.
These users thanked the author Anna MultiCharts for the post:
shivax


Return to “MultiCharts”