Rules in Pseudo-Code
4 replies
Heilpraktiker
10 years ago #115158
StrategyQuant has created this strategy, which is profitable in backtests:
== Entry conditions
====================================================================
LongEntryCondition = (Close(596) > Ichimoku(7, 25, 43, Senkou Span A))
ShortEntryCondition = (Close(596) < Ichimoku(10, 20, 64, Senkou Span B))
====================================================================
== Entry orders
====================================================================
— Long entry
if LongEntryCondition is true {
if No position is open then Buy on open at Market;
Stop Loss = 8 pips;
// Stop trailing (on close)
Move Stop to (HighDaily(126) + (0.62) * ATR(388))) on bar close;
}
— Short entry
if ShortEntryCondition is true {
if No position is open then Sell on open at Market;
Stop Loss = 8 pips;
// Stop trailing (on close)
Move Stop to (LowDaily(126) + (-0.62) * ATR(388))) on bar close;
}
My question is: what is the meaning of “Close(596)” and HighDaily(126) ? I am over a week in a profitable real Position with this, but it doesnt close or move stop.
I dont want to make a secret with my strategies, so i attach it.
0
Mark Fric
10 years ago #137189
Close(596) is the value of Close 596 bars back.
HighDaily is the value of daily high 126 bars back.
It is used in Stop trailing, it is quite possible that the SL is never moved to any position that makes sense.
The long periods back that this strategy uses suggest that it is only by luck that it is profitable. There should be no edge in condition that Close at 596 bars back is higher or lower than Ichimoku.
You can limit the maximum Bars back in SQ settings to prevent creating this kind of strategies.
Mark
StrategyQuant architect
0
Edinho
10 years ago #137195
Hi Mark
I found that sometimes I struggle with pseudo code explanation. Is there any document or file which help to explain this?
0
Heilpraktiker
10 years ago #137197
Close(596) is the value of Close 596 bars back.
HighDaily is the value of daily high 126 bars back.
It is used in Stop trailing, it is quite possible that the SL is never moved to any position that makes sense.
The long periods back that this strategy uses suggest that it is only by luck that it is profitable. There should be no edge in condition that Close at 596 bars back is higher or lower than Ichimoku.
You can limit the maximum Bars back in SQ settings to prevent creating this kind of strategies.
Thank you, dear Marc 🙂
0
Tomas Matejka
10 years ago #137214
Hi Mark
I found that sometimes I struggle with pseudo code explanation. Is there any document or file which help to explain this?
Hello,
do not hesitate to send an email to [email protected] with pseudo part you don’t understand if you don’t want to share it publicly
0
Viewing 4 replies - 1 through 4 (of 4 total)