Suppress print out from CTrade Sell and Buy functions

To add comments, please log in or register
syrvn 0
134
syrvn 0  

Hey hey!

is it possible to suppress the print Outs from the CTrade sell and buy functions?

Here is my code:

m_trade.Sell(0.1,_Symbol,last_tick.ask,last_tick.ask+SL,last_tick.ask-TP

This produces the following print out in back tester's Journal:

2017.12.15 14:24:15.762 2017.01.02 08:00:00   market sell 0.10 EURUSD sl: 1.07164 tp: 1.03164 (1.05159 / 1.05164 / 1.05159)
2017.12.15 14:24:15.762 2017.01.02 08:00:00   deal #2 sell 0.10 EURUSD at 1.05159 done (based on order #2)
2017.12.15 14:24:15.762 2017.01.02 08:00:00   deal performed [#2 sell 0.10 EURUSD at 1.05159]
2017.12.15 14:24:15.762 2017.01.02 08:00:00   order performed sell 0.10 at 1.05159 [#2 sell 0.10 EURUSD at 1.05159]
2017.12.15 14:24:15.766 2017.01.02 08:00:00   CTrade::OrderSend: market sell 0.10 EURUSD sl: 1.07164 tp: 1.03164 [done at 1.05159]

Having this print outs all the time makes it really hard to read my own print outs.......

Sergey Golubev
Moderator
106094
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Suppress print out from CTrade's buy and sell functions

syrvn 0, 2017.12.15 14:43

Hi there!

is it possible to suppress the print out from the CTrades buy and sell functions?

Here is my Code:

m_trade.Sell(0.1,_Symbol,last_tick.ask,last_tick.ask+SL,last_tick.ask-TP

This produces the following print out in the back tester's Journal:

2017.12.15 14:24:15.762 2017.01.02 08:00:00   market sell 0.10 EURUSD sl: 1.07164 tp: 1.03164 (1.05159 / 1.05164 / 1.05159)
2017.12.15 14:24:15.762 2017.01.02 08:00:00   deal #2 sell 0.10 EURUSD at 1.05159 done (based on order #2)
2017.12.15 14:24:15.762 2017.01.02 08:00:00   deal performed [#2 sell 0.10 EURUSD at 1.05159]
2017.12.15 14:24:15.762 2017.01.02 08:00:00   order performed sell 0.10 at 1.05159 [#2 sell 0.10 EURUSD at 1.05159]
2017.12.15 14:24:15.766 2017.01.02 08:00:00   CTrade::OrderSend: market sell 0.10 EURUSD sl: 1.07164 tp: 1.03164 [done at 1.05159]

syrvn 0
134
syrvn 0  

Where did you find that post? This was my original but after clicking the add button the page freezed and I reloaded it and the post was gone.hm....We can delete one of them

Sergey Golubev
Moderator
106094
Sergey Golubev  
syrvn 0:

Where did you find that post? This was my original but after clicking the add button the page freezed and I reloaded it and the post was gone.hm....We can delete one of them


You made two threads (with slightly different titles). So, I moved one post/thread to this thread, and I deleted the double thread (second one).
So, no problem.

syrvn 0
134
syrvn 0  
Sergey Golubev:

You made two threads (with slightly different titles). So, I moved one post/thread to this thread, and I deleted the double thread (second one).
So, no problem.


Perfekt, thank you! :)
Anthony Garot
1828
Anthony Garot  
syrvn 0:

Hey hey!

is it possible to suppress the print Outs from the CTrade sell and buy functions?

I don't think this is possible.

What you could do is write your own output directly to your own log file using FileOpen, FileWrite, FileClose, etc.

To add comments, please log in or register