Newbee to prorealcoding would appreciate tips
- This topic has 4 replies, 4 voices, and was last updated 5 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
Forums › ProRealTime English forum › ProOrder support › Newbee to prorealcoding would appreciate tips
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):
|
1 2 3 4 5 6 7 8 9 |
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 |