I want to fade a stock moving higher with preset entries based on the previous bar. Sudo code would be like this
1. if last price > high of last bar and
price = high of the day and
current bar (5 min) is not first bar of day and
current bar (5min) is not > than the 10th bar of the day then
1. sell limit order X # of shares at price of last bar + .02 and
2. sell limit 100 shares every .25 higher
end if
-ALSO- I need a profit target
so upon the first order being fullfilled a buy to cover limit order of .50 to be entered and for each additional 100 shares sold higher a CHANGE in the profit target order price and quantity to reflect the total amount of shares short AND the current average price of the shares sold. I want to maintain the profit target of .50 per share but have the actual limit price move higher as my average cost basis goes higher with each additional short.
I would like to be able to do this on NT7 as that appears to be coming out shortly.
Any direction would be great so that I can start using ninja to automate my trading.
Thank you
Robert
Comment