I wonder if there is such a code (w/ below description).
What would the basic code be w/ the following parameters ? (w/ an understanding that any indicator w/ a value could be plugged in)
(Opening trades)
1. A long trade is placed when an indicator's current value goes higher than previous bar's close value. (intrabar not close)
2. A short trade is placed when an indicator's current value goes lower than previous bar's close value. (intrabar not close)
(Closing trades)
1. Long trades are closed when short trades are opened.
2. Short trades are closed when long trades are opened.
thanks
What would the basic code be w/ the following parameters ? (w/ an understanding that any indicator w/ a value could be plugged in)
(Opening trades)
1. A long trade is placed when an indicator's current value goes higher than previous bar's close value. (intrabar not close)
2. A short trade is placed when an indicator's current value goes lower than previous bar's close value. (intrabar not close)
(Closing trades)
1. Long trades are closed when short trades are opened.
2. Short trades are closed when long trades are opened.
thanks