1 (edited by moonsky 2019-04-08 10:23:18)

Topic: Can I run ea? if there are a few bars.

Hi experts,

I just found a good strategy. But The Entry&Exite rule consists of many timeframes and symbol logics at the same time.
When I attached it to the chart. The ea will be removed automatically. Plz see the following image.
Is it possible for the chart have no bar enough?
I have tried to export Ea to *.Mt5. It works well. But *.mt5 cannot be used in portfolio-maker.
If anyone knows how to solve this? plz tell me


https://i.postimg.cc/Dm13Gm2z/Capture.png

Post's attachments

Strategy.mq4 261.13 kb, 3 downloads since 2019-04-08 

You don't have the permssions to download the attachments of this post.

Re: Can I run ea? if there are a few bars.

If there are not enough bars then expert tab and journal has an error there, look through them for hints. Does the EA compile? Do you have the necessary timeframes available? Open separate charts for those TF's and see if it helps.

Re: Can I run ea? if there are a few bars.

Hi,

I just go to compile again, then open the separate charts and increase bars by pressing "HOME" for all timeframe and symbol I used. I am sure that the chart have bars enough. If minimum require bars is 287. It's just around  12 days in H1 and 6 days in M30.
The Ea still does not work. Thank you footon.

Re: Can I run ea? if there are a few bars.

No visible errors, unfortunately I can't test it currently on a platform.
But try the one attached if it changes anything.
---
Are there no error messages in Journal and Ea tab?
---
How many bars do you have then for respective symbols? In MT point the cursor at the chart name tab below, then the number of bars will pop up. I think the EA will print the "not enough bars" message on the chart as well.

Post's attachments

Strategy_01.mq4 261.13 kb, 2 downloads since 2019-04-08 

You don't have the permssions to download the attachments of this post.

5 (edited by moonsky 2019-04-08 14:25:05)

Re: Can I run ea? if there are a few bars.

Hi,

I got the same result with ea you attached.There is some error on the expert tab. I attached them here.

This is amount of bars I have count by your way.
EURUSD (4129 bars M30,  4049 bars H1)
GBPUSD (4049 bars H1)
USDJPY (4049 bars H1 )
I dont know where Ea warn "not enough bars" as you said.
thank you very much


https://i.postimg.cc/hJF2s559/Experts.png

https://i.postimg.cc/JDxK144q/Journal.png


error "zero divide (5215,55)"

https://i.postimg.cc/ZvF9kCbb/Untitled.png

Is it possible? using micro account cause this. the minimum lot and lot step of my account are only 0.1 . not  0.01

Re: Can I run ea? if there are a few bars.

Interesting.

There are enough bars, so we can rule it out.

The problem seems to be in spread calculation, somehow Point value is returned as zero, it seems.

Try the next version attached.

Post's attachments

Strategy_02.mq4 261.17 kb, 3 downloads since 2019-04-08 

You don't have the permssions to download the attachments of this post.

7 (edited by moonsky 2019-04-09 06:10:26)

Re: Can I run ea? if there are a few bars.

Still got the same result. Thank to footon.


https://i.ibb.co/6tjxZbZ/1.jpg



(2353,24)

https://i.ibb.co/fkHx0TH/2.jpg


Update!
I have tried to use your ea, It works for another broker (standard account),But my current account doesn't work.
These are the brokers'account I got error. exness(micro),Xm(micro)
And I found your lastest EA is available for tickmill(standard).

Re: Can I run ea? if there are a few bars.

Hmm, yeah, the error is somewhere else... Now it shows array out of range error.

And you have trouble with only micro accounts.

Can you check your all 3 platforms and see what builds they are? In mt click Help->About and the build numbers, probably they are the same but lets be sure.

Re: Can I run ea? if there are a few bars.

yes, all of them are version 4.00 build 1170

Re: Can I run ea? if there are a few bars.

Try this one.

Post's attachments

Strategy_03.mq4 261.16 kb, 3 downloads since 2019-04-09 

You don't have the permssions to download the attachments of this post.

11 (edited by moonsky 2019-04-09 12:56:48)

Re: Can I run ea? if there are a few bars.

Hi,
I am not sure to say that it works or not. strategy_03 works on XM micro now. (* _02 work too I forgot to tell you)
But exness micro account still does not work on both, here is an error.

https://i.ibb.co/pWrSs9r/U1.png

(2145,24)
https://i.ibb.co/HzcGXyG/u2.png
monopoly gif

12 (edited by Popov 2019-04-09 13:08:22)

Re: Can I run ea? if there are a few bars.

It looks like this is a multi-market strategy. If some of the additional market indicators require more than 100 bars, we have to make MT loading them.

Does yuor symbol is EURUSDc?

In that case, the strategy will not load the data because it searches for EURUSD.

This can be the reason it shows that cannot load bars.


We have in the EA:

   strategy.Slot[1].IndicatorName    = "Moving Average";
   strategy.Slot[1].SlotType         = SlotTypes_OpenFilter;
   strategy.Slot[1].SignalShift      = 0;
   strategy.Slot[1].SignalRepeat     = 0;
   strategy.Slot[1].IndicatorPeriod  = DataPeriod_H1;
   strategy.Slot[1].IndicatorSymbol  = "EURUSD";
   strategy.Slot[1].LogicalGroup     = "A";
   strategy.Slot[1].IndicatorPointer = indicatorManager.CreateIndicator("Moving Average", SlotTypes_OpenFilter);

Please search for "EURUSD" and replace it with EURUSDc.

EDIT:

The strategy requires more market also. Please correct the other symbols in the expert.

13 (edited by moonsky 2019-04-09 13:57:49)

Re: Can I run ea? if there are a few bars.

Thank to popov and footon,

I solved by popov way. The ea is available now.
Is it possible? The future, Exporting ea will change variable automatical from software.

Re: Can I run ea? if there are a few bars.

FSB Pro includes the exact symbol names in the EA.

The most reliable way is to import the data from the broker you are going to trade. In your case, the symbols must be EURUSDc, GBPUSDc... and to use these when creating strategies.

FSB Pro may complain of the symbol name because it may require six capital letters. Set them as "CFD" in such a case.

15 (edited by moonsky 2019-04-09 17:01:10)

Re: Can I run ea? if there are a few bars.

I have a little doubt. set them as "CFD" , Does it mean to rename history data to CFD1440,CFD240,CFD60....?
Then how to know which symbol is which?

Re: Can I run ea? if there are a few bars.

When you add a new symbol, set is as CFD. It allows using an arbitrary name. It is necessary because the "Forex" symbols must contain only 6 capital letters.

https://image-holder.forexsb.com/store/FSB-Pro-add-CFD-Symbol-thumb.png