i want a code to buy from bar 1 and sell today, just to compare to strategies i make
There you go:
IF Not OnMarket THEN //BUY immediately
BUY AT MARKET
ENDIF
IF date = 20181017 THEN //SELL on "yyyymmdd"
SELL AT MARKET
ENDIF
Nicolas also coded something here that puts a buy and hold equity curve on the same chart as your strategies equity curve:
https://www.prorealcode.com/blog/learning/buy-hold-comparison-automated-trading-strategies/
perfect! exactly what i needed, thank you!!