Coding help - page 182

 
Guinsanity:
Sorry but isn't work man.

I make some modifications in the code below:

test_7.mq4

Here's the setup:

Short in the close of the candle 0 if his variation (Close-open) is more than X% (im using 0.0008%, don't know if it works in metatrader)

TP and SL will be optimized.

Checking the Volume[0] does not have anything to do with it. It simply check how many ticks have passed since the new bar is opened and if less than 10 ticks have [passed it allows an order to be opened.

From your post :

But the system isn't taking short position at the close of the candle

Do you wish it to open a new position as soon as the previous candle is closed, or what? From the above quote it seems as it is what you are looking for

 

Thanks Mladen!

I solve the problem, using the expert advisor builder.

 

Dear Mladen..

is it possible to change the original formula "MACD colored +mtf" as in the picture

Files:
 
bayuveneo:
Dear Mladen..

is it possible to change the original formula "MACD colored +mtf" as in the picture

bayuveneo

They are doing the same job except that the second (lower) version) does it in cleaner and a bit faster way

 

Is there some way I can get an alert (sound, box, email?) when an ea triggers a trade? It is a commercial ea with only the ex4 file, so I have no way of inserting alert coding into the ea itself.

Thanks

 
person77:
Is there some way I can get an alert (sound, box, email?) when an ea triggers a trade? It is a commercial ea with only the ex4 file, so I have no way of inserting alert coding into the ea itself. Thanks

You could try monitoring orders with a specific magic number from some simple indicator

 
person77:
Is there some way I can get an alert (sound, box, email?) when an ea triggers a trade? It is a commercial ea with only the ex4 file, so I have no way of inserting alert coding into the ea itself. Thanks

Here is one indicator that does that

If you leave the magic number to be 0, it will alert for all magic number

If you leave the symbol to be "", it will alert for all symbols

Also, set the number of seconds that it will consider the order as new (default is 5 minutes - it will not repeat alerts for tha same order, but it needs this in order to disregard old orders from possible alerting). It recognizes all types of orders

Files:
 
kenwa:
Hi mladen, i try to make the attach ones, they has display now, but don't know any inherent syntax problem or errors, could you kindly check for its syntax correctness/problems, also do we need bracket every buffers inside {....} in each calculation equation? they mainly different in the counting and loop direction, which is better and sure non repaint backwards? thanks for advice and checking.

It seems to be OK

 

Thank you! I'll try it out soon.

 
person77:
Thank you! I'll try it out soon.

Tested it and it works OK, but let me know how it works on your account(s)

________________

PS: since it is an indicator it has to wait for the first tick to come in to check new order. So sometimes you will have the delay till the new tick is in. Other than that there should be no delays at all (regardless of how many new orders have been newly opened)

Reason: