With the DEAL_ADD I get the price of the deal, so the SL in my case. All seems correct to me. I suggest you send me the code you use, the backtest log (as a file) and a screenshot of Strategy tester Settings. Then I can reproduce the exact same test as yours and analyse the result. You can send me a PM if you prefer.
Hello,
can you tell me where exactly the executed stop or target price is stored:
With the DEAL_ADD I get the price of the deal, so the SL in my case. All seems correct to me. I suggest you send me the code you use, the backtest log (as a file) and a screenshot of Strategy tester Settings. Then I can reproduce the exact same test as yours and analyse the result. You can send me a PM if you prefer.
If you mean TRADE_TRANSACTION_DEAL_ADD and MqlTradeTransaction.price, this price is always 0.
Even if i do not filter for TRADE_TRANSACTION_DEAL_ADD, the price is always 0, after entry order sent out.
I use
CTrade.Buy(...) // place entry
and
CTrade.PositionModify // to attach stop and target
angevoyageur: The log I provided you is from the Viewer, when you read the log directly from Strategy Tester Journal tab, it is displayed inthe reverse order.
i usually open the logfile from backtest log-tab, where order is from top to down. So in fact, the logentry indicating price is written before the transaction occurs.
So, we are talking about backtesting only. I have tested with my own code and I obtain 3 transactions when a stop is triggered :
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_DEAL_ADD(6)
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_ORDER_DELETE(2)
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_HISTORY_ADD(3)
Hello,
can you tell me where exactly the executed stop or target price is stored:
a) MqlTradeTransaction
b) MqlTradeRequest
c) MqlTradeResult
along with member. What MetaTrader server ?
Thank you
So, we are talking about backtesting only. I have tested with my own code and I obtain 3 transactions when a stop is triggered :
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_DEAL_ADD(6)
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_ORDER_DELETE(2)
2013.05.15 10:22:27 Core 1 2013.05.10 16:20:37 Symbol : EURUSD event : TRADE_TRANSACTION_HISTORY_ADD(3)
If you mean TRADE_TRANSACTION_DEAL_ADD and MqlTradeTransaction.price, this price is always 0.
Even if i do not filter for TRADE_TRANSACTION_DEAL_ADD, the price is always 0, after entry order sent out.
I use
CTrade.Buy(...) // place entryand
CTrade.PositionModify // to attach stop and targetand
to catch transactions.
If you mean TRADE_TRANSACTION_DEAL_ADD and MqlTradeTransaction.price, this price is always 0.
Even if i do not filter for TRADE_TRANSACTION_DEAL_ADD, the price is always 0, after entry order sent out.
I use
and
and
to catch transactions.
This is with MqlTradeTransaction.price, it's not always 0.
There is something weird in your results, but I can't see what with the code you provide.
Here the log with your EA tc_ea_trans :
Hello Angevoyageur,
find attached again simple EA. This should demonstrate it. It just places an order with tight stop and target (input param) and logs each transaction.
I really appreciate your help.
(Perhaps you can also show your entry transactions)
Could you also give me mt-server ip ?
Hello Angevoyageur,
find attached again simple EA. This should demonstrate it. It just places an order with tight stop and target (input param) and logs each transaction.
I really appreciate your help.
(Perhaps you can also show your entry transactions)
Could you also give me mt-server ip ?
I use the EA you just posted. MQ demo, Access point Europe. Backtesting with :
I take an random excerpt from the log :
So, you still have a problem detecting a SL/TP triggered ?
I use the EA you just posted. MQ demo, Access point Europe. Backtesting with :
I take an random excerpt from the log :
So, you still have a problem detecting a SL/TP triggered ?
oh. i see.i could swere in my runs yesterday there was no such price given. I made a text search for this price in the backtest log.
But now, i can see this transaction AFTER logentry
"take profit triggered "
in my lastest run as well - along with execution price.
I apologize for all the time it takes.
oh. i see.i could swere in my runs yesterday there was no such price given. I made a text search for this price in the backtest log.
But now, i can see this transaction AFTER logentry
...The log I provided you is from the Viewer, when you read the log directly from Strategy Tester Journal tab, it is displayed in the reverse order.
Hello Angevoyageur,
" Access point Europe. Backtesting with : "
can you give me complete IP of this server ?