Can someone help me write code to test for the following:

1) I would like to buy on the next positive MACD cross after a stock's
price has closed below its 200EMA. I would like my initial stop to be
the lowest low within X days of buy.

2) If price has gained X% since purchase move stop to break-even.

3) If C/200EMA is > X sell at the next negative MACD cross


Thanks

Reply via email to