# Code strategy

**URL:** https://tradingqna.com/t/code-strategy/3266
**Category:** Algos, strategies, code
**Created:** [June 15, 2015, 8:14pm UTC](https://tradingqna.com/t/code-strategy/3266 "2015-06-15T20:14:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nageshsaru](https://tradingqna.com/letter_avatar_proxy/v4/letter/n/5f9b8f/32.png) [@nageshsaru](https://tradingqna.com/u/nageshsaru)
#### Post date: [June 15, 2015, 8:14pm UTC](https://tradingqna.com/t/code-strategy/3266/1 "2015-06-15T20:14:38Z")

</div>

Dear Zerodha,

As per the subject concerned code my strategy for short sell. I've few Scenarios for you.

**SCENARIO 1** :- OPEN = HIGH, @ 9:15 AM, Execute @ 9:16 A.M.

Such that,

a) High\> Prev.Close.

b) Strictly , Don't Short Sell (or) **Do Not Trade** if, HIGH \< = Prev.Close

c) Keep SL-M, Tr. Price = \< 0.1&nbsp;% of Today's High

**SCENARIO 2** :- Execute Short Sell if :-

Today HIGH \>= 0.35 % of&nbsp;Prev. High&nbsp;

Such that,

a) **Don't Execute Short Sell** if :-&nbsp;Today's High \<&nbsp;Prev.Close @ 9:15 A.M. to 9:20 A.M.

b) Keep SL-M,&nbsp;Tr. Price \<=&nbsp;0.1&nbsp;% of Today's High

Please don't disclose answer/my question on this tradingqna.com , Requesting to email me: nagesha12adig@gmail.com

---

<div class="post-metadata">

### Author: ![AlgoGeek](https://tradingqna.com/user_avatar/tradingqna.com/algogeek/32/6398_2.png) [@AlgoGeek](https://tradingqna.com/u/AlgoGeek)
#### Post date: [June 15, 2015, 8:52pm UTC](https://tradingqna.com/t/code-strategy/3266/2 "2015-06-15T20:52:26Z")

</div>

As per above query&nbsp;

Buy Script:

```
HIGH>REF(CLOSE,1)
```

you can n't give percentage with tradescript as per above condition

---

<div class="post-metadata">

### Author: ![nageshsaru](https://tradingqna.com/letter_avatar_proxy/v4/letter/n/5f9b8f/32.png) [@nageshsaru](https://tradingqna.com/u/nageshsaru)
#### Post date: [June 15, 2015, 9:08pm UTC](https://tradingqna.com/t/code-strategy/3266/3 "2015-06-15T21:08:02Z")

</div>

How to Code for :-  
1)Don’t Short Sell (or) Do Not Trade if, HIGH \< = Prev.Close.  
Also i’m asking you for : Short Sell  
Buy Script ? I Didn’t understood.
