Hello, sorry for the English (google translator) .... I'm trying to create a simple system, which consists of: the arithmetic moving average of 20 must be rising, and when the exponential moving average of 9 turn up, and when the maximum candle that made the average turn is exceeded by 0.01 cent, we should buy. The sale will occur below the .01 cent candle does the moving average of 9 ARITHMETIC turn down. Build a rule-based system, but purchases and sales do not meet the established criteria, could check the code and see if they can fix. GRATEFUL.
CODE:
Please log in to see this code.
Size:
Color:
Is this closer?
CODE:
Please log in to see this code.
Size:
Color:
Unfortunately not. The trade system has made very few trades, even when we can observe these conditions present in the graph, the trades are not triggered. In a base of over 100 shares and more than 5 years, made only 42 trades in total. Will we get the condition if the MMA of 20 of the script, and we keep only the remainder, it can solve the problem?
Size:
Color:
If you could point at a couple of real world examples of the entry and exit conditions as you see them on charts, then we might have a better idea as to what part of the code should be modified.
Size:
Color:
Size:
Color:
The basic idea would be to wait nine MME 9 turn up, then we mark the candle where the average turned. Overcoming generates maximum purchase. After that we started to look at the arithmetic moving average of 9 until she turn down. We set the slightest of that candle. When you lose that minimum sell. If MMA9 down turn and the minimum is not lost, and MMA9 back to turn up, do not conduct the sale, making only when the average minimum and turn the candle which she turned down, is lost by 0.01 cents.
Size:
Color:
If I understood you correctly...
CODE:
Please log in to see this code.
Size:
Color:
Sorry for the delay in responding, but I had personal problems. I do not know if you ran the strategy in their datasets? In my not execute any trade, both within 60 minutes, as in daily or weekly. Thanks.
Size:
Color:
In my tests, of course it did trade.
The rules are:
1 - When SMA(9) has a TurnUp, we buy when this bar's High + 1 tick is broken
2 - When SMA(9) turns down (TurnDown), breaking below this bar's Low - 1 tick triggers a sale
Load enough bars, choose 1 share Raw Profit and I'm sure it will trade.
Size:
Color:
I do not know why, but the WealthLab closed and then opened again and worked normally.Sorry to bother you but I need the rules have an important modification:
1 - When EMA(9) has a TurnUp, we buy when this bar's High + 1 tick is broken
2 - When SMA(9) turns down (TurnDown), breaking below this bar's Low - 1 tick triggers a sale
Thank you for your patience.
Size:
Color:
Please refer to this page on how to use EMA in your Strategies:
EMA It's easy, and the Wealth-Lab Programming Guide >
DataSeries shall provide additional guidance.
Size:
Color:
Ok thanks. I think I succeeded.
Size:
Color: