READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Opposite blocks definition between outputs of the same indicator

1 replies

Cristian Martínez de Morentin Suescun

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

8 months ago #292326

Hello,

I am coding a custom KeltnerChannel indicator which has three outputs:

  • Upper
  • Middle
  • Lower

When using my indicator for setting price entry levels in Stop/Limit orders, I would like to specify that the opposite value of the “Upper” output is “Lower” and vice versa. For example, in case I am using the Upper output as a Stop entry level for Long orders, I want to set the Lower output as a Stop entry level for Short orders. In summary, I need to use the “OppositeBlock” functionality between the outputs of the same indicator. Can you please help me?

Thank you so much.

0

Cristian Martínez de Morentin Suescun

Subscriber, bbp_participant, customer, community, sq-ultimate, 4 replies.

Visit profile

8 months ago #292328

I have solved it by implementing the following Negater class (see attached). I have tested it and it seems to be working fine.

It is based on the UpperLowerNegater. Can you please check it and confirm it is correct? If I am not mistaken, it should have higher “priority” than the UpperLowerNegater class given that it has a lower @SortOrder(10099). This way, the indicator with “Middle” buffer use this Negater instead of the UpperLowerNegater.

Thank you!

0

Viewing 1 replies (of 1 total)