Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 05:26:45 +0000



Post From: Cancelling Unfilled Orders on Renko Close

[2018-06-29 13:41:14]
User640497 - Posts: 2
Hello

I have been attempting to cancel an unfilled buy order if the Renko brick during which it was submitted closes as a red brick and to cancel an unfilled sell order if the Renko brick closes green.

I've been using cell J27 with the formula:

=OR(AND(M3=0,ID2.SG1@4<ID2.SG2@4), AND(K3=0,ID2.SG1@4>ID2.SG2@4))

This formula is accepted by the cell (no syntax error) but returns a value of 1 for every brick and doesn't cancel any unfilled orders. (ID2 is the 'Visual Renko Open/Close' indicator)

I have tried just entering the 'cancel unfilled buy order' formlua

=AND(K3=0,ID2.SG1@4>ID2.SG2@4)

Which successfully cancels unfilled buy orders and their associated OCO working orders when brick 3 closes as a red Renko brick and no buy position has been entered

I've also entered just the 'cancel unfilled sell order formula'

=AND(M3=0,ID2.SG1@4<ID2.SG2@4)

Which successfully cancels unfilled sell orders and their associated OCO working orders when brick 3 closes as a green Renko brick and no sell position has been entered

However the =OR expression

=OR(AND(M3=0,ID2.SG1@4<ID2.SG2@4), AND(K3=0,ID2.SG1@4>ID2.SG2@4))

that I think should have the spreadsheet evaluate both expressions and cancel the orders if either is true, doesn't work for either expression and the spreadsheet completely ignores all unfilled orders

is there something wrong with the =OR formula? Or is there a better approach to achieving the cancellation of unfilled orders in this manner? I've checked the support page

http://www.sierrachart.com/index.php?page=doc/SpreadsheetExampleFormulasAndUsage.php

and related threads from the support board but haven't found any answers.

Please advise

Thanks