here it is … test it please. this works well in every timeframe. swing_zz has to be in the indicators folder, but not necessarily on the chart, it works without it. the expert has a min_bar setting, try it on different settings please. put on a chart, it will draw the two trendlines and connects the high and low points.
oh yeah, and this is an expert, i’d like to add trading functions as well, so that’s why it’s not an indicator.
tell me what you think, what else should i put in it.
The only thing i notice is that if i flick timeframes (with the EA attached and active) there is a bit of a delay before the trendlines are re-drawn.
If i re-attach the EA to that timeframe the trend lines re-appear.
I think what you have done is pretty awesome !
I guess you could build into it the rules Blizard mentioned about being too close to Fib, you could show the fib lines on the screen and even dummy proof it (at least for testing the EA) a sign on screen saying something like “DON’T Trade” or “Trade” if current prices are too close to the Fib lines?
What about making the two red trend lines thinner so their the same thickness as the swing_zz so its a little clearer for us to manually see the candle touching the lines?
You could also add in a manual take profit and stop loss? So if we execute a trade manually it will auto-close at the desired level or the internal EA when trading automatically will close it?
For stop loss i would suggest something like this:
stoploss_manual: true/false (if true use stopless that we set and if it is false use the stoploss of the last dot acording to Blizard’s strategy.
Take profit i can’t figure out an optimum, but what could work is to add a trailing stop loss so after we open a trade it willplace the stoploss 1 pip above 0 ? or whatever value we decide, might be best to leave this as an option we can set so we can all play around with this and then decide on whats optimum.
For cosmetics wise why not only show one of the trend lines based on if the current dot is red or blue? and even add the arrow pointing which way to buy if you want to get idiot proof?
With regards to trading functions, i think lets leave that to last. Once we have all the other elements in place then we can take the next step, but i would recommend having an option in this EA to disable it from automatically trading so that we can choose to trade manually or automatically.
Also for future additions if it could be linked upto a news server or pull an RSS feed which contains news we could get the EA to not trade and cancel pending orders say 10 mins before the news begins and start again say 10 mins after the news event has ended.
But it is awesome, that was fast ! i didn’t think you would have something so quickly
Also could you post the MT4 code so we can help bug fix and could you number your releases i.e. 1.0, 1.1 just so we all know to upgrade when you release a new one
Also just seen this happen, i don’t think the trend lines are auto-updating and moving along to the next set of dots when a new dot is formed, can anyone else confirm?
you have to set the ea settings min bar too. the ea doesn’t look visually the chart, it calls the swing ea indicator from disk. please make sure that swing_zz indi and the ea settings are the same. i guess you have less than 4 set on swing_zz indi.
i know why it refreshes slowly, i’ll fix it tomorrow. it refreshes and follows the change of swing_zz, mine just redrawed itself.
about the line style, i’ll post the source code tomorrow and you can change it to your needs. also after attaching the ea you can change the line style as you like.
about the trade and no trade stuff … i suggest you to use a pivot indicator and decide yourself if you enter a trade or not. i think the price action is more reliable than a given distance from a key line. i can do it, sure, but i think it’s not very important as you can see the lines on the chart.
as for sl, tp … the stop loss will be as the system says. below the opposit confirmed dot. for tp i guess we just have to monitor our trades, but there will be a parameter for a default tp level.
i will add arrows where the ea gets a valid signal.
there will be TRADE_LONG, TRADE_SHORT parameters to allow it to enter or not. it will alert you if it entered.
okay … i just realized that you updated your post so … i want to clarify a thing. this strategy on m1 is a scalping strategy. so we can just watch news releases (forexfactory news indicator for example) or just calendars. we can adjust our stops and tps. so i don’t really want to build a full auto ea. this is just a sidekick for this strategy that if you put on and allow it for trading you can make breakfast, walk your dog, watch other currency pairs, you don’t have to wait for that exact second to enter a trade. of course we can make this ea better, and i will code what i can, but i don’t want to just leave it to trade without me.
versions ok, mq4 file ok.
i think i answered everything i guess if i make some progress tomorrow i’ll post it. i think i’ll make the refresh bug for sure. that’s the most important thing right now. also i check if i can get the swing_zz indicator settings out from it and pass the minbars to the ea. this way it’s enough to change the indicator to have correct trendlines.
Awesome thanks by the way in regards to the screenshots i posted i set the swing indicator to minibars 3 and your ea’s minibars set to 3. Maybe your planned fixes will fix this isue?
I have been working with a programmer to develop an EA but the logic doesnt seem like its 100% as sometimes is draws trend-lines without using confirmed dots. I will attache it maybe, one of the programmers here could make sure the logic works properly. I think its 90% there. Ill try to get the editable version within 1-2 days so we can get this EA going.
Epidot: if you watch twentysomething pairs, it’s good to have automatic trendlines i guess. this is why i started script this thing. however, it will be your decision that you let the ea enter a trade or not. this is just a little helper, not a real ea.
Blizard: cool, everyone will have his own version i’ll continue work on mine, if i have the correct method for detecting the trendlines, i’ll post the mq4 file here, your programmer can have it and use it.
To be honest i like the idea of both EA’s presented here. Stockneon’s is the perfect addition for trading this system manually and with stockneon’s trendlines in Blizards automated trading system the automated EA might be good.
But we all have different styles of trading so i can’t wait to test stockneons updated EA and Blizards one once its done. I think trading with both will be good
Here is just the indicator, there are some minor logic issues but we should have the final version by Monday that waits for the confirming dot to appear before drawing the trendline.
update! i just quickly corrected the update issues, so everything works fine i guess.
update bug fixed hopefully (ea runs on every tick update on the chart, you have to wait price to change for the lines to appear)
mq4 code
version is on the header of the file
trendline color, with can be set by just modifying the properties of the trendline objects or find it in the code and change there if you want to change the default values. they are under “expert initialization function”. there OBJPROP_COLOR, OBJPROP_WIDTH.
i don’t know if i can do more than this today, it depends that my friends are going out to drink or not