READ-ONLY

The forum is now a read-only archive.

For bug reports & platform questions → [email protected]

Our community lives on Discord and YouTube — come join us!

Profit Trailing

18 replies

mikeyc

Customer, bbp_participant, community, 856 replies.

Visit profile

10 years ago #114970

Hi SQ Team and users,

I have a question about Profit Trailing.  This is the type of trailing where the stop loss is moved X pips from the current price as it moves in your favour.  This is not the Stop Trailing feature which uses an indicator value or comination of indicator values to move the stop on the bar open.

 

My question is, Profit Trailing has been implemented in the EA (MQ4 code) to only move the stop loss on bar open, is this what is intended?

 

I would have thought the use of profit trailing (like MT4 terminal offers on an open order) is to move the stop with X pips of the current price on every tick, to capture fast moves.

 

So, for example if you have a 1 hour strategy, and price moves very quickly within that one hour bar, the stop would be moved many times.  As it is, the stop is only moved every hour.

 

Regards,

 

Mike

0

Gaudio Fx

Subscriber, bbp_participant, community, 22 replies.

Visit profile

10 years ago #136498

Well, the strategies generated this way do work very well for me with trailing on bar open only:) You can just remove the bar open check in the MT4 code, you´ll see the strategy will turn to waste then if they trail by tick. The strategies SQ creates are meant to trail on bar open only, they do not work better if they trail by tick out of sudden – give it a try by editing the MQ4 code to not just trail on bar open. If SQ would generate them with tick trailing, then it´s another story. But then the problem comes in that tick trailing is SO highly broker dependent because the characteristics of tick-streams are heavily different between brokers (e.g. some brokers deliver 100, other up to 700 ticker per minute) that it will not work in live trading, even if you created the strategy with tick-data (and even if you use your own brokers tick data that you´ve collected with my MQL4 script for that). Believe me, I´ve been down that route more than a few times and it never ever worked live, the backtests simply won´t match. While if trailing on bar open only, I get a 99% match of live trades to SQ / MT4 backtests. If you need faster trailing, just create strategies for 1M timeframe then, then SQ will trail each minute and you don´t need tick-data to backtest / create them nor will they be unreliable in live trading since amount of ticks within the 1 min bar and which we can´t know during backtesting will not matter.

I tried in every way to make my profit trailing in tick-by-tick mode and not on bar close
but I could not find a solution!!
the only option may be is to change the mql file, but does anyone know how to explain this feature to convert into a real trailing without waiting for the bar?
 
I’m going crazy!
 
: /
 
GREEKTRADER said “You can just remove the check open bar in the MT4 code, you’ll see the strategy will turn to waste then if they trail by tick.” .. But I did not understand what he wants to hear.
 
GREEKTRADER, would you explain to me how to do?
 
I have to delete some code inside the file?
 
what should I do? add some code inside?

0

Tomas Matejka

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #136529

Gaudio Fx,

 

there is a piece of code containing check for bar open (returns false in other cases that prevents following code to be processed). When you remove this, it should work tick by tick.

I will verify tomorrow just in case there is some additional stuff that needs to be removed

0

geektrader

Customer, bbp_participant, community, 503 replies.

Visit profile

10 years ago #136533

Why keep twice the same topic alive? Answer is over here: https://strategyquant.com/forum/topic/4526-profit-trailing-on-close-how-to-convert-tick-by-tick/#entry16532


🚀 Unlock Your Edge in Automated Forex Strategy Development 🚀

Historical Forex Data Starting From 1987, 28 Pairs, M1, 99% Error-Free, Lifetime Free Updates

0

Viewing 3 replies - 16 through 18 (of 18 total)

← 1 2