Hi all,
I want to learn and try to use proreal code to trade. I want to start with a strategy which probably is very simple. I want to go long when ma9 crosses above ma20 and short when ma20 go below ma9. I have never programmed in proreal code and would appreciate very much to get tips how i start with this strategy and use this strategy to program a code and then backtest it. I would try to use it on Dax30.
best regards
jandah
There you go (not tested):
FastMA = average[9,0](close)
SlowMA = average[20,0](close)
If FastMA crosses over SlowMA and Not OnMarket then
Buy 1 contract at Market
ElsIf FastMA crosses under SlowMA and Not OnMarket then
Sellshort 1 contract at Market
Endif
Set Target pProfit 100
Set Stop pLoss 50
That is the sort of simple strategy that can easily be created using the strategy creation tool that is built in to the platform.