♥ 0 |
Hello Pete, I would like to know how to use two moving averages cross over, ( i.e 20 and 50sma)with a stop loss and price target and want to see it is viable to test it in real life. I have the script for a simple buy or sell, but I need a guide to add a stop loss and price target, please. def LongMA=simplemovingavg(length=LongMALength); def buy =ShortMA[1]LongMA; addOrder(OrderType.Buy_to_Open, buy, name=”Crossoverbuy”, tickColor = Color.DARK_GREEN); def sell =ShortMA<LongMA; addOrder(OrderType.BUY_AUTO, no); RESOLVED
Marked as spam
|
Please log in to post questions.