• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

Suggestion Need a help for making an mt4 script

3. It is not possible to simultaneously place two opposite pending orders at the opening price of a new bar.

I don't understand where you want to put pending orders.

Show in the picture where you want to put them?

Based on the open price of that new bar:
- place buy stop e.g 20 pips away from BID price, not ask price.
- place sell stop e.g 20 pips away from bid price.

Thanks.
 
_02.png _02_1.png _02_2.png _02_3.png

I launched the Expert Advisor and it placed pending orders, as it should.

Show in the picture what you don't like.

Do you understand what I'm asking you?

Indicate on my pictures what the expert is doing wrong there.
 

Attachments

  • _02.png
    _02.png
    177.1 KB · Views: 35
  • _02_1.png
    _02_1.png
    175.1 KB · Views: 34
  • _02_2.png
    _02_2.png
    35.6 KB · Views: 33
  • _02_3.png
    _02_3.png
    63.1 KB · Views: 35
View attachment 158051
Do you get what I mean?

Ok.

If the specified distance from the open candle is less than the allowed one,
The EA will calculate the placement of the order based on the minimum allowable distance from the current price.

The pictures show two examples. With a given distance dist_order = 25 points.
With a given distance dist_order = 0 points.

Lines have been added for visualization and understanding.
At the prices where orders will be placed.
That is the dotted line.

To remove lines, Set Show_price_line = false;
 

Attachments

  • _1.png
    _1.png
    64.1 KB · Views: 40
  • _2.png
    _2.png
    67.6 KB · Views: 40
  • _3.png
    _3.png
    69.1 KB · Views: 37
  • _4.png
    _4.png
    85.1 KB · Views: 38
  • _5.png
    _5.png
    75.5 KB · Views: 41
  • _6.png
    _6.png
    76 KB · Views: 39
  • !exp_STOP_Order_2B.ex4
    !exp_STOP_Order_2B.ex4
    23.5 KB · Views: 14
Ok.

If the specified distance from the open candle is less than the allowed one,
The EA will calculate the placement of the order based on the minimum allowable distance from the current price.

The pictures show two examples. With a given distance dist_order = 25 points.
With a given distance dist_order = 0 points.

Lines have been added for visualization and understanding.
At the prices where orders will be placed.
That is the dotted line.

To remove lines, Set Show_price_line = false;
Ok, will try it out on monday, when the market open. Btw, at the moment you may do the request from Traneur87.
Thank you.
 
Last edited:
@
I will not do it.

Hey Shipr
Hope you doing great was wonderingi f you can assist me with converting an mql4 source file to mql5 by any chance,all should be exactly as it is in mt4 but i'd appreciate it if you can make it mt5 please.
Here is pic and file.

I think its a great indicator that we can benefit from.
Do let me know if it is possible or not,thanks.
 

Attachments

Back
Top