Mohamed Mostafa Mohamed Sonbol / Publications
Forum
Can anyone explain why this code is not working !!
I am trying to capture in real time if any position is closed and then get its comment. not the last position in history. whatever i try nothing seems to work, here is an example can anyone give me a clue or it can not be done ! void OnTradeTransaction ( const MqlTradeTransaction &trans, const
OnTradeTransaction () comment is missing !!
i am trying to capture latest closed position and print its info , everything is printing correctly but the comment is not at all , i tried to add small delay but no show !. void OnTradeTransaction ( const MqlTradeTransaction &trans, const MqlTradeRequest &request, const MqlTradeResult &result) {
Order comment not showing !
Hello using this code everything appears fine but the order comment from the string TradeComment is not shown at all any idea what could be wrong ?? // variables string DayStart = "00:00" ; // Day Start Time double LastClosed_Profit; // Last Closed trade profit string TradeSymbol, TradeType
PositionModify , change TP but leaving SL the same
do i have to get the SL value and place it again if i want to change only TP value ? cause placing a 0 delete my SL value . thanks
Next highest and lowest element in double array ?
hello Anyone have the code for this? i know it's simple but my mind is somehow blocked. let's say i have an array contains few double elements, I know one of these elements and need to get the closest hi and closest low to this element. I don't want to use sorting and indexing, thank you
Accessing indicator Array from EA
Hello i have an array inside the indicator , how can i use it in another EA? i can think that it needs to be copied to buffer and access it using icustom ? if thats the case how can i copy the array to the buffer ? i cant seem to find anything about it or maybe i am missing it . or maybe there is
intercept buy/sell terminal order ?
Anyway to intercept orders to modify it or even prevent it from execution ? (and by orders i don't mean pending orders I mean instant execution from build in oneclick panel or from other EA for example
Exiting Loop according to bar count ?
hello i am trying to exit a loop after number of bars appears the code is like that void OnTick () { int barnum1 = ( Bars ( _Symbol , _Period )); int barnum2 = ( Bars ( _Symbol , _Period ))+ 1 ; do { int barnum1 = ( Bars ( _Symbol , _Period )); // do something here
Signal Tab is missing in Demo account
hello From my understanding that if i have a demo account i can still subscribe to real signal or even demo signal but on my MT4 when i log with demo account the Singal tab disappears and only appear if i log with my real account is that normal? so i cannot subscribe to any signal on demo account