manage manual trade per chart
-
Hi
Is it possible to manage manual trade per chart, not market?
I am using one click trading on two charts of the same pair but i i want manage trade trailing and stoploss independently.
thnx
-
I'm not sure what are you trying to do, but I guess the answer is yes

-
__I'm not sure what are you trying to do, but I guess the answer is yes
[/quote:25shdx1u]Ok, it is like this. I'v created trade manager in fxdreema. If i click buy eurusd with one click trading, trade manager is adding sl 10, tp 20, trail, be to the trade.
I'v have second chart eurusd in the sam mt4 with one click trading. If i click buy on this chart i want different settings like sl 20, tp 40, to the trade from this chart.
Link of the EA https://fxdreema.com/shared/8iloQfi6
Problem is that second trade is modified by the first ea (sometimes second) because it is the same market eurusd.
Is it possible to moddify manual trade only on chart that trade is created, not all manual trades on eurusd?
thnx
-
I wrote this funny text here, hopefully you will get it: https://fxdreema.com/documentation/gett ... c%20number
This is again about magic number, but when you use it in fxDreema: https://fxdreema.com/documentation/proj ... d%20groupsIn short, you can use Magic Number to make trades and orders to appear as they belong to different groups, but the chart itself is not important. You can actually create GBPUSD trades from EA running in EURUSD chart, for example. The magic number is what allows you to group them, when their symbol name and type (buy, sell) is not enough.
About your EA - block 7 and block 8 are not used correctly. I wrote about this 100s of times here and there, so I'm just tired to do it again. Read this if you want: https://fxdreema.com/demo/mt4-loop-how-it-works
Blocks 9, 1, 3 and 5 are filters. You also have the same filters in 11, 2, 4 and 8, so 9, 1, 3 and 5 are not needed for the work of 11, 2, 4 and 8.
-
__I wrote this funny text here, hopefully you will get it: https://fxdreema.com/documentation/gett ... c%20number
This is again about magic number, but when you use it in fxDreema: https://fxdreema.com/documentation/proj ... d%20groupsIn short, you can use Magic Number to make trades and orders to appear as they belong to different groups, but the chart itself is not important. You can actually create GBPUSD trades from EA running in EURUSD chart, for example. The magic number is what allows you to group them, when their symbol name and type (buy, sell) is not enough.
About your EA - block 7 and block 8 are not used correctly. I wrote about this 100s of times here and there, so I'm just tired to do it again. Read this if you want: https://fxdreema.com/demo/mt4-loop-how-it-works
Blocks 9, 1, 3 and 5 are filters. You also have the same filters in 11, 2, 4 and 8, so 9, 1, 3 and 5 are not needed for the work of 11, 2, 4 and 8.[/quote:p9pmq9qk]
Ok, thnx. Will optimize EA on you suggestion.
But i kind of still think that you did not understood me regarding charts. On your first link there is: "Manual trades and orders have Magic Number = 0."
I have two scenarios on the same MT4, same pair eurusd, but one manual trade.
Scenario 1:
I use autoclick news software. There is news with low impact, software clicks eurusd buy on first chart, block "if trade is running" sees manual trade is running and adds sl 10, tp 20.
Scenario 2:
There is news with high impact, software clicks eurusd buy on second chart (not first chart) at this point i want that ea ads different sl 20, tp 50.
My idea was to distinguish this two different trades (high and low impact) with two ea's that have different settings because i don't know what kind of news will come out. One on every chart waiting for manual trade on that chart.
-
Here are all the built-in MQL4 functions designed to create, delete, modify and get information from trades and pending orders. You can see OrderMagicNumber(), OrderStopLoss(), OrderLots()... there is nothing special for the chart where the trade/order is created. Instead, Magic Number is normally used to distinguish trades from different EAs. But when you put them manually, it is 0.
More than that, when you create a trade in one chart, it immediately appear on the other charts from the same symbol. I will say this again, when you send request to the broker to create a new trade, no information about the current chart is sent (who knows really?) and no information about this chart can be get then, when you read properties of trades and orders. Simply because there is no such property like OrderChartID().
Anyway, the only thing that pops in my mind is the Comment property. But you need to remember to always write something there... this is not very intuitive.