setstoploss_pt issue ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

setstoploss_pt issue ?

Postby Smoky » 05 Jun 2017

Code: Select all

if STPloos=true then
begin
messagelog("STOPLOSS ON");
SetStopPosition;
switch VTF
begin
case 1: setstoploss_pt(6);

case 3: setstoploss_pt(10);

case 4: setstoploss_pt(15);

default: setstoploss_pt(3);

end;
end;
why this code doesn't work ?

Code: Select all

SetStopPosition;
setstoploss_pt(3);
of course this code works

can you change pt number in dynamic ?

User avatar
Angelina MultiСharts
Posts: 260
Joined: 28 Dec 2016
Has thanked: 28 times
Been thanked: 66 times

Re: setstoploss_pt issue ?

Postby Angelina MultiСharts » 07 Jun 2017

Hello Smoky,

We don't see an issue with the script you've provided. One possible reason here: high frequency calculations change your stoploss faster than MC can process it.

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: setstoploss_pt issue ?

Postby Smoky » 07 Jun 2017

Hi Angelina, thanks for your answer, but conditions STPloos=true and the variable VTF are changed manualy through GV and my windows interface.

and I never see one stoploss on the chart ... but with last two lines of code stoploss_pt(xx) are ok.

Maybe stoploss_pt(xx) can't be changed on the fly ... or SetStopPosition; ?

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: setstoploss_pt issue ?  [SOLVED]

Postby Smoky » 15 Jun 2017

Hi, Angelina i found an issue from my side, you can close the topic.

Thank You


Return to “MultiCharts”