function run() { Stop = 10*ATR(100); TakeProfit = 1*ATR(100); // open new trade at random after last trade hit its target if(NumOpenTotal == 0) { if(random() < 0) enterShort(); else enterLong(); } } How to get the backtest report for the asset 'MSFT'?. Give me full code.
Re: Alpha Vantage API key - where to put?!
[Re: veepsirtt]
#471259 02/25/1815:3402/25/1815:34
function run() { assetHistory("SPY",FROM_GOOGLE); asset("SPY"); Stop = 10*ATR(100); TakeProfit = 1*ATR(100); // open new trade at random after last trade hit its target if(NumOpenTotal == 0) { if(random() < 0) enterShort(); else enterLong(); } }
it raises error 014 ATR needs LookBack 140>80! How to correct it?.
Re: Alpha Vantage API key - where to put?!
[Re: veepsirtt]
#471262 02/25/1815:5602/25/1815:56
How to download unadjusted one-minute (M1) price data from the selected broker? It downloads daily data. function run() { set(TICKS|FAST); NumYears = 5; assetAdd("SPY"); assetHistory("SPY",FROM_AV); asset("SPY"); plot("Dotted",price(),DOT,GREEN);