You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
idea: you could use always the same magic number as usual to make it compatible with everything else that uses magic numbers but also combine it with the comment string by including a number in the comment that is unique to each pair of trades. You could then find the other trade of each pair of trades by simply looking for a trade with the same magic and comment.
How can I find an order by comment & magic number?
I have 15 triggers
i don't want a standard lets say TP 200 SL 300
each currency pair will have a different TP and SL Depending on statistics of the trigger
if a higher probability trigger comes i want to identify it and take action
trigger1 eur/usd 100 prob: 94%, usd/jpy 300 prob:74% eur/jpy 200 prob.100%
if trigger 1 traded for one of the pairs eur/usd no more trading for that pair for that trigger
i still want to trade for trigger2 trigger3 and (trigger1 just different pair)
y not
you don't need separate magic for buy and sell, you can easily filter them with OrderType()
thank you for your help
you don't need separate magic for buy and sell, you can easily filter them with OrderType()
I use a RANGE of magic numbers, so I can use different SL methods for trades.
e.g. MAGIC_NUMBER_BASE = 1234500
& then use 'offset' of 0-99 to groups my trades by SL type. I then use code like
if(OrderMagicNumber() < MY_MAGIC_LO || OrderMagicNumber() > MY_MAGIC_HI)
to find my trades (actually that code is to EXCLUDE my trades!)
Jon this function issues unique numbers
Thanks, I finally get to revisit this thread and is trying this out. I do not understand the Sample. Why OrderSend > 0, then perform another OrderSend? Please help!
I realized that the Sequence Number will increase with every order and that I could assign it to comment or magic number which is great. The best part is that they remain in the system even after I restart MT4.
However, how do I identify and compare them later?
How each set of orders are placed:
i.e. I trade in pair, Order 1 & 2, then Order 3 & 4, and so on....
Order 1 - Sequence #1
Order 2 - Sequence #2
Order 3 - Sequence #3
Order 4 - Sequence #4
Order 5 - Sequence #5
Order 6 - Sequence #6
Now that they have unique sequence number that increment,
How do I select them and compare?
I would like to select and compare
Order 1 & 2, then Order 3 & 4, then Order 5 & 6, and so on ...
Thanks in advance!
... Continued from above reply
Or maybe I could control when the sequence number would increase?
i.e. after each set of orders? Like after 2 orders.
So when selecting and comparing, I could just select orders with the same sequence number.
How to code that?
Thanks!
Save Theese in an Array[][]
example.
Trade 1
TicketArray [1] [0] = Ticket0;
TicketArray [1] [1] = Ticket1;
Trade 2
TicketArray [2] [0]
TicketArray [2] [1]
Trade 3
TicketArray [3] [0]
TicketArray [3] [1]
... And so on