Counts the number of open short shares or lots.
Syntax:
1 |
COUNTOFSHORTSHARES |
Example :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
myMACD = MACD[12,26,9](close) short = myMACD crosses under 0 //first order IF NOT ShortOnMarket AND short THEN SELLSHORT 1 CONTRACTS AT MARKET ENDIF MAXSHARES = COUNTOFSHORTSHARES < 5 //let's add another order while price continue to get higher (more than 10 points) than the last order taken with a condition of 5 bars elapsed since then IF TRADEINDEX(1)>5 AND TRADEPRICE(1)-Close>10 AND ShortOnMarket AND MAXSHARES THEN SELLSHORT 1 CONTRACTS AT MARKET ENDIF SET STOP TRAILING 50 |
Does it given us a positive number always?