Who does JAPAN LIGHTS shine on? - page 8

 

Is there a check to ensure that the code is only triggered once on bar opening? :-)

 
RomanS >> :

Take a look yourself.... you have too many entries (false) on M30 225, on a higher timeframe there should be less, but there are more, this is not right!!!! NL = 450 is not good for an hourly!


Got home... :)


About the size - I've been pondering over the screenshot and I think I've guessed a bit about the trading principle - goodness it's clearly visible. Well, in such cases I prefer to use some dynamic market value. In this case, maybe the average bar range for the day multiplied by some multiplier will do? (This is for M30 - 48 bars). The simplest inductor is in the attachment.

Files:
 

Yes there is, but silly.... I'm not a pro, I'm a beginner...

Checking in the variable int LastTradeTime = 0;

When a position is opened, the value is assigned...

LastTradeTime=TimeHour(TimeCurrent());

At the next position opening, we check

if (LastTradeTime!=TimeHour(TimeCurrent())

i.e., some signals are skipped.... i made this EA quickly, i should correct it, because it really ignores some news at 16-30 and not only, if there is a signal on the eve

 

I ran it on FXCM ECN, i.e. with floating spread and commission.

The results are in the attachment. Not bad for a start.

Need to build an explicit bar opening control.

Files:
candle4.rar  49 kb
 
RomanS >> :

{...} LastTradeTime=TimeHour(TimeCurrent()); {...}

A silly question is an unasked question, a silly attempt is an unsuccessful attempt :-).

If the Expert Advisor is on M30, then checking TimeHour() is exactly wrong -

it means to cut the number of candlesticks by half.

... or maybe it is a chip ;-) >> then don't fix it.

 
jartmailru >> :

A silly question is an unasked question, a silly attempt is an unsuccessful attempt :-).

If the Expert Advisor is on M30, then checking TimeHour() is exactly wrong -

It means to cut the number of candlesticks by half.

... maybe it is a trick ;-) ? then don't fix it.


No... It is not a trick...

I am just a beginner and do not know how to implement it properly...

TimeM30() is not in MT, that's why I used TimeHour(), if anyone can help, thanks...

 

IMHO, take not TimeCurrent() but Time[0]- this is the start time of bar 0.

We also need to make sure that we have it.

M30 is 30*60 = 1800 seconds. lastTime = Time[0] - Time[0] % 1800;

This is the start time of the current M30 in seconds.

 
Azzx >> :

Got home... :)


About the size - I've been thinking about the screenshot and I think I've guessed a bit about the trading principle - thankfully it's clearly visible. Well, in such cases I prefer to use some dynamic value of the market. In this case, maybe the average bar range for the day multiplied by some multiplier will do? (This is for M30 - 48 bars). The simple indicator is in the attachment.

I thought so, soon replace HL with a value which is calculated by software... I.e. for each currency, this value will be different, as in principle it should be

 

The question is as follows... Yesterday I developed my idea of EA, got great results and offered it for testing to my friend in another brokerage company, namely UMIS, the results were almost drained my deposit, not to mention the profit (yes, yes, Sereg, I'm talking about you, I know you're reading this thread ... :) ),

So I decided to take my Expert Advisor to the public ... How it will show itself in other conditions, in other brokerage houses.

But so far, not much results are seen... from those who promised to lay them out...

I have 21 forum users, but only two of them have given me feedback...

I want to find out if the quotes have such a great effect on the EA or my friend just does not know how to test properly?

 
I've put something similar together and run it on GBPUSD. The optimization period ends with 222 trade. The result is similar.
Files:
otch5.zip  16 kb
Reason: