What an honour, to be included with those two esteemed oracles!
Dont forget that there are several other excellent contributors on here...
My 2c worth is to do the Bid Ration stuff in a couple of indicators - one indi wont cut it as you can only have a max of 7 outputs
Also, try not to do everything on every tick - maybe that wont help on this one as you could be after transient Hi/Lo's, an FPI kind of thing..?
Good Luck
-BB-
What an honour, to be included with those two esteemed oracles!
Dont forget that there are several other excellent contributors on here...
My 2c worth is to do the Bid Ration stuff in a couple of indicators - one indi wont cut it as you can only have a max of 7 outputs
Also, try not to do everything on every tick - maybe that wont help on this one as you could be after transient Hi/Lo's, an FPI kind of thing..?
Good Luck
-BB-
just this ea is eating 50mb of ram.
i need to code it using less mem...
Hey, thanks for the compliment.
Had a look at your code.
My logic says here are the options:
- Throw more memory at the problem ---> 50mb isn't that expensive; I guess it depends upon your deployment strategy
or
- Do less ---> only you know what you're trying to achieve, and if your calculations could be short-cutted; would declaring the variables once in init() - rather than each run of start() or BR() make a difference - worth a try
- Do it less often ---> could you perhaps only execute on a change of bar; could you cycle the calculations so that each currency has its turn with each tick to refresh its calculation
- Look for the wildcard ---> could it be that this will take less memory when run outside of strategy tester
CB
1) Change those Print();Print() to one Comment(...,"\n",...) Prints are cache in ram (for the journal) and on disk.
2) Compute them less often (not once every tick)
technical analysis 8/12/2009
EUREKA!
:)
Anyway, dushur. 2 things that always causes memory issues in mt4 is the amount of bars loaded on chart, and amount of different symbols you use at the same time.
Since your EA relies on many different symbols at the same time, you only have one option, and that's to limit amount of bars on your chart. That's an easy fix.
Tools -> Options ->Charts tab -> Max Bars on chart
Change it to something reasonable for your strategy. Do you need more than 50,000 bars for your EA? For backtesting, yes, but not for live trading usually.
After you make the change close metatrader and open it back up and it should reflect the change.
Hope that helps.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
need some help from the gurus here
can check how to reduce the memory for this ea?