MQL4 Learning - page 23

 
1Dave7:
double b=MarketInfo("EURUSD",MODE_BID);

1) How do I get this into a numeric variable that I can add and subtract with???

2) What can I substitute "EURUSD" with that I can use it on any currency with hardcoding the currency pair in?? NULL does not seem to work.

If you got the answers, Please help!

Dave

<<<

1. A double is a numeric value which you can add and subtract, so it's already done.

2. MarketInfo(Symbol(), MODE_BID); uses the current chart which the ea or indicator is attached to.

 

Got the info, now how do I use the info in a formula??

Forget it.

 

Great, Thanks - did the trick! I will document this for the future in my notes.

Have a great week!

Dave

<<<

 

how to draw little circle

Hi MQL master,

I need help , how to draw little circle on each end of hi low zigzag line .?

Thanks

==================

Forex Indicators Collection

 

Use a zig zag pointer program (Match the zig zag settings) and change the arrow to a 108 or 161, 162, 163 versus 234, 233. You can change the size of the circle or dot by changing the number 4 after the arrow to smaller by a lower number.

Hope this helps!

Dave

<<<

Files:
 

Putting symbols into the chart by an EA

Hi,

is it able to insert symbols like arrows or something else by a generatet signal of an EA?

Thanks

 

Yes; check the "Object" functions.

 

stochk0> stochk10 ?

iStochastic(Symbol(), Period(), Stoch_K,Stoch_D, Stoch_Slowing, MODE_SMA, 0, MODE_MAIN, i)> iStochastic(Symbol(), Period(), Stoch_K,Stoch_D, Stoch_Slowing, MODE_SMA, 0, MODE_MAIN, i)?

________

"(stochk0 > stochk10)

double stochk0 = iStochastic(Symbol(), Period(), Stoch_K,Stoch_D, Stoch_Slowing, MODE_SMA, 0, MODE_MAIN, i);

double stochk10 = iStochastic(Symbol(), Period(), Stoch_K,Stoch_D, Stoch_Slowing, MODE_SMA, 0, MODE_MAIN, i);"

 

Modify a magic number?

Hello all,

I am wondering if anyone can help me with this problem? I keep track of ALL orders in my EA's through magic numbers. Every order has it's own unique magic number assigned to it.

What I want to know is this: Is it possible to modify an open order and change it's magic number identifier? Any help would be greatly appreciated!

 

You probably know it yourself but the only function in MQ4 that changes parameters of an order is OrderModify().

Unfortunately it doesn't allow to modify magic number.

Reason: