Coding help - page 385

 
cosmiclifeform:
Hi Jason2005,

The Red and Green Arrows are values in the buffers of your indicator....not your EA....

Use iCustom in your EA to call your indicator values in the buffers...and then use them for your trading strategy.

There are many good posts here in this forum about how to use iCustom in your EA...

In the meantime...if you attach your indicators here...someone may be able to help show you which indicator buffers you can use in your iCustom statements.

Hope this helps,

Robert

Thank you very much for your very kind help! So I've set up the icustom and everything. My condition is as follows : if(dw!=EMPTY_VALUE && dws!=EMPTY_VALUE)

But I have to specify a shit for the arrows... The thing is, I don't know at what distance they are going to be one from another. Also, how do I specify that the candles between these arrows have to all be UP.

I really thank you for your kind help. I can't thank you enough!

 
Jason2005:
Thank you very much for your very kind help! So I've set up the icustom and everything. My condition is as follows : if(dw!=EMPTY_VALUE && dws!=EMPTY_VALUE)

But I have to specify a shit for the arrows... The thing is, I don't know at what distance they are going to be one from another. Also, how do I specify that the candles between these arrows have to all be UP.

I really thank you for your kind help. I can't thank you enough!

Jason

That line means that the conditions are not store in buffers but in variables. You should add 2 buffers to your indicator and on each tick save the values of dw and dws to those new buffers and that way you can access those values using iCustom() from the EA (and that way you can easily reconstruct the desired conditions)

 

Dear Mladen,

My ea is really behaving funny, it will take sell order, but NOT buy order.It will just throw error 130 for the buying order.Knowing a bit what error 130 is, I started adjusting my stop order, and modifying orders as well as testing accross various brokers, still yet, it keep on throwing error 130 to buying order on the testing machine.kindly help out. This is the ea below attached with the error screenshot

Files:
cwork2.mq4  5 kb
 
Mastercash:
Dear Mladen, My ea is really behaving funny, it will take sell order, but NOT buy order.It will just throw error 130 for the buying order.Knowing a bit what error 130 is, I started adjusting my stop order, and modifying orders as well as testing accross various brokers, still yet, it keep on throwing error 130 to buying order on the testing machine.kindly help out. This is the ea below attached with the error screenshot

Error 130 usually means two things :

1. Stop loss and / or take profit are to close to the current bid or ask price - in this case try using larger stop loss and /or take profit

2. Your broker is an ECN/STP type broker - in that case you first have to open an order with stop loss and take profit set to 0 and after that modify that order to desired top loss and / or take profit

 

Thanks....Ive attached the code, the brokers are not ecn, I have adjusted the stop orders, still no way...see the code below

mladen:
Error 130 usually means two things :

1. Stop loss and / or take profit are to close to the current bid or ask price - in this case try using larger stop loss and /or take profit

2. Your broker is an ECN/STP type broker - in that case you first have to open an order with stop loss and take profit set to 0 and after that modify that order to desired top loss and / or take profit
Files:
cwork2.mq4  5 kb
 
Mastercash:
Thanks....Ive attached the code, the brokers are not ecn, I have adjusted the stop orders, still no way...see the code below

Mastercash

Try it out now : cwork2_1.mq4

Files:
cwork2_1.mq4  5 kb
 

I tried it, it never take the buy order, it just modify buying order and take selling order only......,see the screenshot below

mladen:
Mastercash Try it out now : cwork2_1.mq4
Files:
 
Mastercash:
I tried it, it never take the buy order, it just modify buying order and take selling order only......,see the screenshot below

All is OK from my quick test :

I did not check the logic since you had a problem with order opening. The order opening problem has been fixed. The logic of how and when you wish orders to be opened, closed, etc ... depends on you now

Files:
test.gif  73 kb
 

ok, thanks.

mladen:
All is OK from my quick test :

I did not check the logic since you had a problem with order opening. The order opening problem has been fixed. The logic of how and when you wish orders to be opened, closed, etc ... depends on you now
 

I am having problems with emails or push notifications (in one build they work in another they don't, and so on...)

Is there a way to avoid metarader functions for that completely?

Reason: