Hello guys,
I used to code the ProScreener only and this is my first try to code the ProBuilder.
A very simple idea: I want to sell a stock if it is in a downtrend and touches the SMA20+3*STD. The stop loss should be SMA20+4*STD and the take profit is the SMA20.
Seems to be simple but I have problems with the syntax and would be very thankful for any help.
entry=average[20](close)+3*std[20](close)
stoploss=average[20](close)+4*std[20](close)
takeprofit=average[20](close)
downtrend=close<average[50](close) and average[50](close)<average[200](close)
if downtrend then
if high>entry then
sell 100 shares at market
set stop loss stoploss
set target profit takeprofit
endif
endif
Try SellShort (instead of Sell).
Sell is only used if are already Long.
It works, thank you very much.
Is is somehow possible to get a report from all trades or is it just visually in the chart possible to analyze the backtests?
it should automatically deliver a report, but if not then left click on “ProBacktest – Equity curve:” and select Detailed Report
you can customise the report for what details you want to see.