
Hi there:
Well, I just downloaded the MetaTrader.
Made (half way): a trend following program.
TendUp: if 3 consecutive bars have both -- increasing Highs & increasing Lows.
TrendDown: if 3 consecutive bars have both -- decreasing Highs and decreasing Lows.
Tying to follow the trend and exit by: putting in OrderModify based on the highest High from the last 6 bars (or the lowest Low from the last 6 bars) as long as the ticket is still active in the market.
Then, stay out of the market for 3 bars, to avod sideways action.
Well that is the idea.
However, in practice: Have difficulty to get past the "compile" step.
(The logic might not have been coded right: still working on the if-while and {}...
So attaching my code (such as it is).
If someone could get the program to perform, one could (finally) see if it an OK idea, or not.
Thanks......