I see that while I have been away in far off mountains, some old hands have been working hard in the forum! Thanks for the link to
ZigZag is NOT ZigZag!
.
I had to implement my own version which is not as good as the one in Big Be's thread and I still have issues with the transient zz-pivot. Rather than rewrite this code I added complementary methods and additional cross references which in somes ways relate to the ATR without using ATR directly.
It was suggested to me that if this EA is coasting while the forex ATR is too low for reliable trading, why don't I see if it can work with other instruments such as the UK100...
Although, I expect the methods should work just as well on an index, unfortunately there are places where the code assumes currency pairs.
Another issue is that some brokers specialise in currencies only and others invent there own names for these other instuments.
So can I make changes without ending up with empty variables and execution errors?
For example Alpari UK has a couple of variations for UK100:
a) _UK100
b) UK100.U
Whereas Oanda has its own version
a) UK100GBP
Therefore, it did not make sense to try and define these names in advance.
Instead I have just defined a list of the core names:
Code: Select all
string CommonIndexPairs = "SP500,S&P,UK100,WS30,DAX30,DJ30,NAS100,CAC400";
and added a function to pick out similar names from Broker's own list
then I add them to the forex list. I added another function to strip out any instrument which does not return a valid price:
Code: Select all
17:38:35 zzbb_UK100_mt4b509 _UK100,H1: BrokerIndexPairs: UK100.U,_UK100
17:38:35 zzbb_UK100_mt4b509 _UK100,H1: DropUnknownSymbols()...
17:38:35 zzbb_UK100_mt4b509 _UK100,H1: xSymbolsToTrade:
UK100.U,_UK100,EURUSD,USDJPY,GBPUSD,AUDUSD,USDCHF,USDCAD
This is working as far as it goes, but it also needs to run through the code to open and close trades to be sure there are no additional currency traps.