Reset Stop or Limit  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
signalworks
Posts: 65
Joined: 06 Oct 2013
Location: Germany.Solingen
Has thanked: 23 times
Been thanked: 2 times
Contact:

Reset Stop or Limit

Postby signalworks » 01 Mar 2017

Hello,

my logic orders next bar at limit/stop. How can I cancel/reset the limit/stop at the bar/tick where the level would be reached? A reset at the tick before works, but no more when the level is reached.
Thanks.

Regards.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Reset Stop or Limit

Postby TJ » 01 Mar 2017

I am not sure if I understand what you are talking about.

Do you have codes? Charts? Real number examples?

User avatar
signalworks
Posts: 65
Joined: 06 Oct 2013
Location: Germany.Solingen
Has thanked: 23 times
Been thanked: 2 times
Contact:

Re: Reset Stop or Limit

Postby signalworks » 02 Mar 2017

Hi TJ,

like this (Pseudo)Code:

Code: Select all

//SET ENTRYLEVEL
If condition1 then entry_level = level;
//RESET ENTRYLEVEL TO PREVENT A SIGNAL BECAUSE OF CONDITION2
if c >= entry_level and condition2 then entry_level = 0;
//ENTRYBAR
if entry_level > 0 then sell short next bar at entry_level limit;
If the entry_level is reached (entry bar) but condition2 is true, the signal have to be prevent. This works only til the bar before the entrybar.

Thanks.

Regards.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Reset Stop or Limit

Postby TJ » 02 Mar 2017

Hi TJ,

like this (Pseudo)Code:

Code: Select all

//SET ENTRYLEVEL
If condition1 then entry_level = level;
//RESET ENTRYLEVEL TO PREVENT A SIGNAL BECAUSE OF CONDITION2
if c >= entry_level and condition2 then entry_level = 0;
//ENTRYBAR
if entry_level > 0 then sell short next bar at entry_level limit;
If the entry_level is reached (entry bar) but condition2 is true, the signal have to be prevent. This works only til the bar before the entrybar.

Thanks.

Regards.

This is too abstract for me. Maybe others can help.

User avatar
signalworks
Posts: 65
Joined: 06 Oct 2013
Location: Germany.Solingen
Has thanked: 23 times
Been thanked: 2 times
Contact:

Re: Reset Stop or Limit

Postby signalworks » 02 Mar 2017

Hi TJ,

sorry for my explanation. Using a 1-tickchart. On the next tick, the signal would be generated. Is there a trick, to prevent the signal on this tick, if condition2 (see above) will be true on this tick. A check on the tick before the signal-tick works, but I want to check a condition also on the signal-tick, to prevent it in the last moment.
Thanks.

Regards.

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

Re: Reset Stop or Limit  [SOLVED]

Postby Angelina MultiСharts » 03 Mar 2017

Hello signalworks,

Order generated on N tick will be sent on the N+1 tick.
So when the condition is met, order cancellation/modification can only be sent on the tick that follows.


Return to “MultiCharts”