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.
Reset Stop or Limit [SOLVED]
- signalworks
- Posts: 65
- Joined: 06 Oct 2013
- Location: Germany.Solingen
- Has thanked: 23 times
- Been thanked: 2 times
- Contact:
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Reset Stop or Limit
I am not sure if I understand what you are talking about.
Do you have codes? Charts? Real number examples?
Do you have codes? Charts? Real number examples?
- signalworks
- Posts: 65
- Joined: 06 Oct 2013
- Location: Germany.Solingen
- Has thanked: 23 times
- Been thanked: 2 times
- Contact:
Re: Reset Stop or Limit
Hi TJ,
like this (Pseudo)Code:
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.
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;
Thanks.
Regards.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Reset Stop or Limit
Hi TJ,
like this (Pseudo)Code:
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.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;
Thanks.
Regards.
This is too abstract for me. Maybe others can help.
- signalworks
- Posts: 65
- Joined: 06 Oct 2013
- Location: Germany.Solingen
- Has thanked: 23 times
- Been thanked: 2 times
- Contact:
Re: Reset Stop or Limit
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.
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.
- Angelina MultiСharts
- Posts: 260
- Joined: 28 Dec 2016
- Has thanked: 28 times
- Been thanked: 66 times
Re: Reset Stop or Limit [SOLVED]
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.
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.