Page 1 of 158

Coding Help

Posted: Tue Feb 14, 2017 12:03 am
by mladen
Coding Help: Post your coding & programming questions and ask for assistance here


Decided to keep this subject as a section, not as a single thread.

I think that this way we can have cleaner overview and state of coding issues and help (which will, eventually, help more than one single thread will all the issues - harder to find, at the lest then seeing issue short description in the thread name ...)
___________________________

So I would like to suggest it as a kind of a standard :
the thread name should have a short, but descriptive name that describes well enough the codding issue

Re: Coding Help

Posted: Tue Feb 14, 2017 12:42 am
by oguz
I hope this is a good start for everyone.
and
I am on the first request

Dear @mladen,
The attached ea has 8 warning(s) on latest build mt4.Are these warnings important? If important things can be corrected?
Thank you

Re: Coding Help

Posted: Tue Feb 14, 2017 12:47 am
by mladen
oguz wrote:I hope this is a good start for everyone.
and
I am on the first request

Dear @mladen,
The attached ea has 8 warning(s) on latest build mt4.Are these warnings important? If important things can be corrected?
Thank you.
Only the warning at line 686 is important
Try changing it to :

Code: Select all

      if (DayWeek == 1 && (TimeHour(WaitTime - 3600 * ManualGMToffset) < StartWorkTimeHour || ((TimeHour(WaitTime - 3600 * ManualGMToffset) == StartWorkTimeHour &&
         TimeMinute(WaitTime) < StartSessionMinute)))) return;
and let us know if test run OK then

Re: Coding Help

Posted: Tue Feb 14, 2017 1:45 am
by oguz
mladen wrote:
Only the warning at line 686 is important
Try changing it to :

Code: Select all

 if (DayWeek == 1 && (TimeHour(WaitTime - 3600 * ManualGMToffset) < StartWorkTimeHour || ((TimeHour(WaitTime - 3600 * ManualGMToffset) == StartWorkTimeHour && TimeMinute(WaitTime) < StartSessionMinute)))) return; 
and let us know if test run OK then
Thank you for your help.
It works fine on backtest

I will test it in the demo as soon as possible. I hope it works well in the live market.

Re: Coding Help

Posted: Tue Feb 14, 2017 7:34 am
by Hermo
Good afternoon everyone:

Hi mladen

I have tried to incorporate an indicator

TimeFrame
Price
MaMethod

And I have a lot of mistakes, you can help me correct it

Thank you very much in advance.

Hermo

Re: Coding Help

Posted: Tue Feb 14, 2017 7:39 am
by mladen
Hermo wrote:Good afternoon everyone:

Hi mladen

I have tried to incorporate an indicator

TimeFrame
Price
MaMethod

And I have a lot of mistakes, you can help me correct it

Thank you very much in advance.

Hermo
Try it out now

Re: Coding Help

Posted: Tue Feb 14, 2017 8:18 am
by Hermo
mladen wrote:
Try it out now
Good afternoon

Hi mladen

The indicator does not draw anything, with no mean

A greeting

Hermo

Re: Coding Help

Posted: Tue Feb 14, 2017 8:21 am
by mladen
Hermo wrote:
Good afternoon

Hi mladen

The indicator does not draw anything, with no mean

A greeting

Hermo
Can you explain what exactly are you trying to do?
PS: I would like to remind that "coding help ..." is a section now. Please guys read the first post of this thread, I really think that the way described there can help everybody

Re: Coding Help

Posted: Tue Feb 14, 2017 9:26 am
by wojtek
Hi, Everybody!

Dear Mladen,
have you ever coded an indicator / expert
preparing charts with TFs smaller than 1M (e.g. 10s)?
Of course, they would probably be built online using ticks, or so...
Such charts / TFs could be sometimes quite useful,
and are available on some trading platforms.

Re: Coding Help

Posted: Tue Feb 14, 2017 9:51 am
by mntiwana
Do you think tick data help you,it is not about creating TFs but that works close to volume wise,but moderator can better explain you.
regards