Log in

View Full Version : How to give a manually entered trade the same MagicNumber as EA



lucaylamgemo
02-02-2015 06:07, 06:07 AM
Hi

When I've a EA that adjusts the TP's of over one order on a particular pair to a particular amount .How do I give a manually entered order the magic number as the the orders entered from the EA so the EA will manage the manual orders also or is there no way?

Thanks for your time


https://www.nigeriaforextrading.com/attachments/1528023441.pnghttps://www.nigeriaforextrading.com/attachments/1528023441.pnghttps://www.nigeriaforextrading.com/attachments/1528023442.png

gigacsubi
11-09-2021 11:30, 11:30 AM
quote Works perfectly.Thank you very much https://www.nigeriaforextrading.com/attachments/1528023443.png Glad I could help. https://www.nigeriaforextrading.com/attachments/1528023443.png

lucaylamgemo
11-09-2021 12:51, 12:51 PM
Ok

I Visit.

Thank you


https://www.nigeriaforextrading.com/attachments/1528023442.pnghttps://www.nigeriaforextrading.com/attachments/1528023442.pnghttps://www.nigeriaforextrading.com/attachments/1528023442.png

poliyeipkm
11-09-2021 14:12, 02:12 PM
https://www.nigeriaforextrading.com/attachments/1528023442.png

lucaylamgemo
11-09-2021 15:32, 03:32 PM
I will try it like this then https://www.nigeriaforextrading.com/attachments/1528023442.pnghttps://www.nigeriaforextrading.com/attachments/1528023442.png


double GetCurrentTPBuy(){
double tp=0.0;
for(int x=0;xlt;OrdersTotal();x ){
if(OrderSelect(x,0) OrderSymbol()==Symbol() ( OrderMagicNumber()==MagicNumber || OrderComment()== ManualTrade ) OrderType()==OP_BUY)
tp=NormalizeDouble(OrderTakeProfit(),Digits);
break;

alelau93
11-09-2021 16:53, 04:53 PM
Depending on your requirements, another option is to produce your own buy and sell buttons for setting manual orders. The buttons may assign the magical number when they start the order

lucaylamgemo
11-09-2021 18:14, 06:14 PM
Depending on your needs, another option is to create your own buy and sell buttons for setting manual orders. The buttons can assign the magical number when they open the order
Yes.This also seems good.I initially was thinking something along that like as nicely with a script or something but a button seems fine.

Thank you

poliyeipkm
11-09-2021 19:35, 07:35 PM
Depending on your own requirements, another option is to produce your own buy and sell buttons for placing manual orders. The buttons may assign the magical number when they open the order Yes that's a great alternative!

lucaylamgemo
11-09-2021 20:55, 08:55 PM
quote Yes that's a great solution!
LOL

Thank you

But I will search for a better way.Thank you for your own comment clarifiion.Will see how that functions

All of the best


https://www.nigeriaforextrading.com/attachments/1528023442.png

giegopemcu
11-09-2021 22:16, 10:16 PM
You can produce a script for your guide order, then it's possible to insert a magic number

lucaylamgemo
11-09-2021 23:37, 11:37 PM
you can make a script for your Guide order, then you can insert a Magical number Seems like a Solid idea

Or I Wish to change the loop that Resembles the trades but will Upgrade whatever I do

Thanks for the Proposal

alelau93
11-10-2021 00:58, 12:58 AM
I'll try it like this then https://www.nigeriaforextrading.com/attachments/1528023442.pnghttps://www.nigeriaforextrading.com/attachments/1528023442.png dual GetCurrentTPBuy(){ double tp=0.0; for(int x=0;xlt;OrdersTotal();x ){ if(OrderSelect(x,0) OrderSymbol()==Symbol() ( OrderMagicNumber()==MagicNumber || OrderComment()== quot;ManualTradequot; ) OrderType()==OP_BUY) tp=NormalizeDouble(OrderTakeProfit(),Digits); break; One thing to bear in mind is that brokers can change or add to an order remark. So you need to be cautious in case your code checks for equality -LRB-==-RRB-

lucaylamgemo
11-10-2021 02:18, 02:18 AM
Thank you.

Im still learning

https://www.nigeriaforextrading.com/attachments/1528023442.png

alelau93
11-10-2021 03:39, 03:39 AM
quote Yes that's a fantastic solution! Thank you https://www.nigeriaforextrading.com/attachments/1528023443.png


Thank you. Im still learning https://www.nigeriaforextrading.com/attachments/1528023443.png We are all still learning!

gigacsubi
11-10-2021 05:00, 05:00 AM
Place the magic number to 0 at the ea.

poliyeipkm
11-10-2021 06:21, 06:21 AM
Set the magic number to 0 at the ea. This will work only if he wants to manage ALL manual orders... not only specific ones...

BTW, that's a good alternative!

lucaylamgemo
11-10-2021 07:42, 07:42 AM
Establish the magical number to 0 at the ea. Works perfectly.Thank you very much


https://www.nigeriaforextrading.com/attachments/1528023443.png

poliyeipkm
11-10-2021 09:02, 09:02 AM
You can not assign to a manual order a magical like an EA does.

The way you can do if you have the source code of this EA is to test orders at the terminal also with using their OrderComment()... Then when you enter a manual order, just fill the comment area with the magic number.