MQL4 Learning - page 19

 
 

Thank you very much for the quick reply, that helps me very much!

Thanks!!!

 

F1 == Help

MQL4:
Hi,

I have some questions too. But can You please write the code and explain it to me short, with an example please?

1)If at 12:00, for example, I opened 2 orders, then I want to close the first order, not all 2 of them, at 1:00. Would someone please show me an example of this with code?

2)I paste the code,

objectCreate("pbstat",StartX,StartY,"test",10,"Arial Narrow",FontColor);

It show me many errorrs. What is objecCreate?pbstat?StartX?StartY?

Can Yo uplease show me an example?

Highlight the "ObjectCreate" and press F1. It will tell you everything you ever wanted to know about this, but where not afraid to ask....

The help pages will have example code for almost every syntax item.

Cheers

 

Hi,

I have some questions too. But can You please write the code and explain it to me short, with an example please?

1)If at 12:00, for example, I opened 2 orders, then I want to close the first order, not all 2 of them, at 1:00. Would someone please show me an example of this with code?

2)I paste the code,

objectCreate("pbstat",StartX,StartY,"test",10,"Arial Narrow",FontColor);

It shows me many errors. What is objecCreate?pbstat?StartX?StartY?

What should I declare as variables?

Would You please show me a simple example?

 
HerbertH:
Highlight the "ObjectCreate" and press F1. It will tell you everything you ever wanted to know about this, but where not afraid to ask....

The help pages will have example code for almost every syntax item.

Cheers

Thank You HerbertH,

When I do that, I get HUGE font. How can I change it?

Also,

If I have a buystop, at 60.

And the price is at 50.

If the price goes to 51, I want the buystop to go to 61.

When the price goes up 1, I want the buystop to go up one.

What is the code?

Thank You,

MQL4.

 

News EA

What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.

 
MQL4:
What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.

You would have to modify the the order's OrderOpenPrice() using the OrderModify() function.

 

learning process

MQL4, this is NOT the way to learn how to code.

If you want to learn how to bake a cake (yummie..) you don't start asking someone to do it for you.

You get a recipe (in your case: the Learning how to code MQL thread) and the ingredients (F1 remember?)

Open lots of existing experts and look what's in it, how its organised and modify it as a first excercise to howto "bake your cake".

Now regarding your BUYSTOP order:

Type OrderModify, select it and press F1. Read the parts that specifically tell you about pending orders.

Good luck.

 
HerbertH:
MQL4, this is NOT the way to learn how to code.

If you want to learn how to bake a cake (yummie..) you don't start asking someone to do it for you.

You get a recipe (in your case: the Learning how to code MQL thread) and the ingredients (F1 remember?)

Open lots of existing experts and look what's in it, how its organised and modify it as a first excercise to howto "bake your cake".

Now regarding your BUYSTOP order:

Type OrderModify, select it and press F1. Read the parts that specifically tell you about pending orders.

Good luck.

I agree, if you're going to ask all these questions, you might as well just pay someone to program your EA for you.

Hey HerbertH.... I'm eatin' yo' baby!

 
MQL4:
What is the code for the following?

If price goes 1 pip up, i want the buystop to go 1 pip up. If the price goes 1 pip down, I want the buystop to go 1 pip down.

Thanks.

News EA (very advanced version) will be posted to the public on Sunday to this thread https://www.mql5.com/en/forum/177102 (mql4 code).

Reason: