Nanningbob V5 auto-trading robot. Newbies, fearlessly ask your basic questions here
To all newbie traders, I say this: all of us with umpteen vouchers to our credit were newbs once. I cringe when I think of some of the questions I asked in the early days.
You cannot post these questions in my EA threads, so I have set up this one for you.
Feel free to ask your questions about anything you do not understand - absolutely anything. Nobody will be critical or dismissive. Not twice, anyhow.
It will not often be me that answers. I can spend my time coding or I can spend it answering questions - I cannot do both. Someone with the knowledge you need will answer.
Have fun. Learn. Listen to the experts. Eventually, you will make money.
Ok. First I want to thank You for this superb software for the great Nanningbob method. Also I am very happy that now I can ask for something
Since You have told that implementing 2.4.2 would be to difficult, could You please consider adding an option of some sort of grid/martingale approach for trades that went wrong?
Back-testing shows that most of a time this bot enters extremely well, but for those rare bad trades I think it would be enough if it just reenter at say 200 pips and close at BE or small profit.
I don't know nothing about codding, so maybe someone could say if it is possible to add this feature.
ps. Ah I just read that 2.4.2 is not abandoned after all, well good luck
Problem with EA in post #101
I cannot post in the other thread, but maybe Steve or Simon reads this. The problem with the EA in post #101 is probably caused by the -1 in this line:
for (int cc = 0; cc < OrdersTotal() - 1; cc++)
This line is in the function CountOpenTrades().
Please read from http://www.forexfactory.com/showpost...&postcount=106
Thanks so much for this awesome EA. I have an issue with the BE function of the EA. It does not account for commission and swap points incurred for brokers such as IamFX. Did I miss something or is there anyway to modify the break even function such that it accounts for commission and swap points? Thank you.
Please ignore, I found the answer.
I am happy that you have prepared the thread for newbies.
I have a question.
In page 3 of the document "Multi-purpose trade manager - instruction for use".
PipsAwayFromVisualJS: the number of pips away from the stop shown in the trade you want your real stop. For example, you want a real stop loss of 200 pips and an emergency trade stop of 400, so you set:
JumpingStopPips = 400.
PipsAwayFromVisualJS = 200.
I can't understand the above explanation, and the meanings of "real stop"
and "emergency trade stop".
Would you please explain with ease?
Attached figure is my understanding.
Fx5_macd_divergence EA request
Hi Steve and all others over here in the coding space...
I've been following Bob for a long time and things are really interesting right now, great community of contributers and ideas around the main thread.
Hope I'm not too cheeky making an EA coding request here on my second post!
I've been eyeballing the FX5_MACD_Divergance indi and noticed this -
Over one month and 24 pairs the indi gave 119 signals, on 114 occasions the following bar was pip positive in the direction of the signal. The losses were 8, 8, 30, 16, and 6 pips. Of the wins some would barely recover the spread, but many run 20, 40, 70 pips and more.
So my idea is for a 'scalping' EA to do the following -
When signal is present take a position at close/open
No SL, TP etc
Close position 4 hours later at close/open
This would fit what I can see from a visual backtest.
I looked at set TP and SL, maybe 'tuned' to individual pairs or determined by ATR, trail stops etc, position of signal bars on chart ie. sixths but nothing really lept off the charts at me until I noticed the huge win ratio and small losses on a one bar basis. I then looked at varying the holding period - 2 bars, 3 bars etc but nothing again, so the simple idea looks best to me at this point.
At a glance I wonder if the average return might be 15-25 pips per trade, but with 100+ trades in a month even 10 pips would be handy for what could be a set and forget EA, depending on backtesting for indication of drawdown and therefore position sizing and then forward testing... wouldn't wanna let 5 losses out of 119 trades sink me!
Anyway I'm guessing the vanilla version I'm proposing would be very simple to code, hope it looks interesting enough for someone to have a look at it.
NB Trend and SAR v1.00
I don't think Simon will come back with a new version of his Trend and SAR EA.
He don't need to work anymore.
Here is result from last week
Profit Euro 3001
tpi----Take profit and stop loss inputs----
htpHidden take profit settings
sliStop loss for catastrophic events
stochStochastic / Laguerre RSI Targets
tcm----Trade closure module----
wlcWhite line closure
tmm----Trade management module----
BEBreak even settings
JSLJumping stop loss settings
TSLTrailing stop loss settings
hsl1Hidden stop loss settings
mas----MA/BB separation inputs----
adxs----ADX filter inputs----
mis----Odds and ends----
I had drastically different results. Can you post a set file for your settings so I might compare it to what I had?
The ea is a doddle to code and I am interested, but I am a tad busy just at the mo. Please pm me in a couple of weeks if I have done nothing about this, with a reference to this post as a reminder.
Thanks for this contribution.
scalpers perfect storm
Hey thanks Steve, awesome.
I knew it looked too good to be true, and sure enough the perfect storm hit on the second to last 4H candle of the week - the system would have taken 5 loss trades for a total -413 pips. Weirdly enough when I've re-opened my platform to evaluate the carnage the indi has re-painted and the signals are no longer there.
This is a good thing, I can now design an EA with the worst case scenario clearly in mind.
I believe the losses can be contained without losing too many gains and I'm not at all phased by re-painting.
So I'm working on a design brief to build in some protection and add a little more detail - will post the package here when I'm done.
Thanks for your interest,
Thanks...interesting you are running on m15
gen ----General inputs----
Copy of NB Trend and SAR V1.
[quote=E2u;3984171]I don't think Simon will come back with a new version of his Trend and SAR EA.
He don't need to work anymore.
Your results were impressive. A copy of the EA was deleted in my folder. Will you be kind enough to post one here. The one posted by Steve is in PHP file and dont know how to convert to mq4. Anyone out there could help me what is a PHP file (with file name attachment) means? Is this an addendum to a previous file?
There is 2 way to get the mq4 file from the forum. One is to copy the name of the file included mq4 in the name and then when you save the file you change the name from attachment.php by paste the name you copied, then click on save. The other way is the paperclip up in the right corner of the page. Click and download the file from there. Always working.
Thanx for ur robot ...
can we state all pair in 1 ea
by doing this, we don't need drag ea for every pair chart.
XYZ Staking Plan
Thanks a lot.
Hi Steve and all,
This is way cool. I would love to learn some EA coding but I simply don't have the time or headspace to take it on for now... I'm quite blown away that people are keen to code my specs.
So here is how I propose handling the 'perfect storm', and why building a system around potential losses is maybe a better approach than focusing on potential gains.
Looking at the trade candles, ie. the one directly following the signal candle, I notice that most have relatively short wicks, so we may be able to employ stops to good effect. If we could also set a maximum number of trades in any one candle we would be able to quantify our largest possible one candle loss, thus allowing very aggressive lot sizing.
I feel so confident that the 'perfect storm' is a once in a blue moon event that I decide I could cheerfully manage a 20% hit to my account. I set max trades to 5 and stoploss to 40 - enough to accommodate most normal trades, so my worst case one candle loss is 200 pips. On a $100 account a 20% loss would be 2000 penny pips, so in this example I would be trading 10c pips. On a $100 account. That is my idea of 'very aggressive' lot sizing.
I've written this in terms that are logical to me as an EA user - these are the input options that I would see. I hope this makes sense to you as a coder. I've included everything I've thought of but not every option is required, I'll expand below.
enter at end of signal candle or enter at signal
enter on classical divergence = true/false
enter on reverse divergence = true/false
Max Trades =
Stop Loss =
Hidden Stop = true/false
Take Profit =
Lot Size as % of account size =
Lot adjustment factor =
An initial EA for testing purposes would require basic functionality options only, Trigger on any divergence at end of candle, Max Trades and Stop Loss. This would fit what I'm looking at on visual backtests.
Optional improvements include:-
It might be interesting to test the trigger inputs I've offered, how would entry at first signal compare to entry at end of candle? At a glance classical divergence looks to do a bit better than reverse divergence, but the key thing is looking for losses...
Max Trade and Stop Loss are essential. Do we need to hide the stoploss? - might be nice to have the option. Take profit - I can't actually see any use for this, end of trade candle looks pretty good. However, I think it would be fairly simple to throw in there and if people start to use this EA then who knows what someone might come up with. Initially the key thing is to have no take profit.
OK this is largely unnecessary at the testing phase of this project. If the EA has legs and can be unleashed into the wild as a set and forget auto-trader then automated lot sizing would be really usefull. Lot Size as % of account size = is fairly self explanatory I think. As for Lot adjustment factor = , I would use this only to keep pip value consistent accross differenet pairs, although others might use it to overweight or underweight particular pairs.
As an ending note, it would be really usefull if Max Trades could output to a log so that we could get a feel for how many trades were triggered per candle. Oh, we probably need to allow for ECN brokers also.
Alright over to you Steve. You post that you are busy right now so no pressure, if you don't get back within a week or two I'll chase you up.
I keep getting this error message - Can anyone tell me where the problem is?
USDCHF OP_BUY Nanningbob order send failed with error(130): invalid stops
Thanks in advance for any help given.
To rely purely and simply on the new candle for trade closure, set tp and sl to zero.
Hey thanks for the fast turnaround Steve, downloaded the EA a couple of hours ago.
I threw the EA up on M1 charts and it took very few trades
The FX5 MACD Divergence indi paints - or rather repaints - the signal arrows on the previous candle. Having observed this behaviour I can't see how it took any trades, maybe when the signal was present right at candle changeover...
The solution would be to place a pending order when the signal occurs, at the close price of the signal bar.
The problem is that this would miss wickless candles ie. the strongest moves, and miss trades that never retrace to the previous candles close whilst guaranteeing picking up the loss trades, eating into potential system returns.
Anyway thats about the only way I can see to get the thing trading right now, then its a matter of seeing how many signals it picks up...
loading NB EA
I was having trouble yesterday getting the NB EA to take trades. you said that if you have the X in the upper right corner it wouldn't take the trade. I did click the "Allow live trades". I did move the "1 #buy 25 BB" file to IBFX and then put in the experts file. And under the Navigator/experts all the EA are blue/yellow. did I miss a step?
On the instruction for NB 4H trading system version 5.2. do the templates under 5.a have any interaction with the EA's?
As to taking trades the instant the signal appears on the M1, words fail me. I a kind, nurturing, totally un-critical way, of course.
For now. Just don't push me, ok? I am not in the best of all possible moods right now.
Those mindless ball-brains that code mt4 release it with ea's disabled by default. Pillocks. Working out why an ea is not working can take a while.
Thank you, that worked now I see on my screen
I put the EA on M1 charts for one reason alone - fast troubleshooting ie. generate some signals and see if the EA is sending trades. I picked that tip up from Nanningbob.
I opened up the code and changed ECN=true to suit my IBFX demo (got the heads up on this from you a while back in another thread - thanks) and set SL and TP to 0 and re-loaded the modified EA. So within about 15 minutes I was able to rule out all the obvious issues that I could think of, now simply testing for entries and exits.
The exits are fine - clockwork.
I then started watching the EA on M15 charts which is where I diagnosed the issue I described in my previous post, I'm currently collecting H1 data.
I would think that in general as you reduce timeframes any indi will become less useful, any signal more plentiful and less reliable and any spread proportionally more expensive. M1 charts are just noise.
I hope you now understand what I was using M1 charts for...
On NB #4EA I have the 3ma set at exponential but it seems to be getting me in to trades to fast, would smoothed work better?
I know that as part of the original system, there are different EA's for different situations.
My question is, are all the robots suppose to be in this 1 EA? And what time frame is the robot traded on ?
I have been trading now for about 6 months and seem to be getting things right much of the time but I can't seem to judge my stops correctly. I'm trading mainly USD/GBP, USD/AUD and USD/EUR but not spots only forward. Not wanting to lose too much money in one trade I am setting my stops between 30 and 50 pips but often, although the trade has gone the right way I have often been stopped out first.
What would you suggest as a sensible stop based on this trading.
I have problem, the max Ea NBv5-19082010-mx025.mq4 works very good on strategy tester, but when I run at chart its write in journal ERR_ZERO_DIVIDE and EA donĘt work, why?
please excuse my bad english, it is not my primary and i`m still learning this beautiful language.
Hey Steve, some really nice work you've been doing there.
Since I can't post on your thread I'll just post it here.
I've been running your bot for David's system on demo this week, and it has shown some good results until now. Most of the losses occured because of some bugs others have brought up already in your thread. I think the bot has some great potential.
I have an idea about implementing a simple but effective money managment system based on a constant risk factor in percantages.
Based on the sl amount in pips the robot would calculate the lot size you can use to only risk a certain percentage of your accont equity.
This way you wouldn't have to adjust the lot size input of the robot by yourself but the robot would do this for you automatically as your balance (hopefully) increases or decreases.
I have found an ea doing this calculation which I have attached for you. I don't know where its originally from but it should give you a better idea of what I mean and give you a source code to start from.
I tried to implement it to your ea by myself, but gave up pretty soon, because unfortunately my skill on coding doesn't go beyond the most simple basics.
Let me know what you think about it
Would someone tell me where (besides post 1) to look for find missing routines and templates that NB trading needs? I am still having trouble collecting everything to get going. I have downloaded and unzipped 5.2a, 5.2b, & 5.3 UPDATES, and NB V5 auto-trader by Steve and Simon runs but alerts that it cannot find Bandwidth Indicator and BolingerBands %b.
try post 2
no gaurantees of course, but the names look good.
I am not going to use it immediately. The NB ea does not need it; I am hoping the trendline ea will also be able to use NB Recovery rather than a stop loss - although I may add it if I can get the basic bot working properly.
In the past people have asked for this sort of mm in my robots. I have not provided it because I could not get my head around constructing the algorithm. I have no doubt that the code you provide here will prove invaluable in the future.
Is it possible to do so, that robot would be on and you would need to check it once a week?
[quote=scalpz;4012956]Try post 2 of Steve's NB V5 autotrader thread
now it runs, but i think ibfx has some rule in their system that does not allow one to set the stop when i place the order, so it alarms err 130 instead whenever it tries to open an trade. Is there another solution than to change brokers?
oops, i think i found it - "CriminalisECN = true" will fix it, right?
© Forex Factory