読み取り専用

フォーラムは現在、読み取り専用のアーカイブとなっています。.

バグ報告やプラットフォームに関する質問はこちら → [email protected]

私たちのコミュニティはDiscordとYouTubeで活動しています。ぜひ参加してください!

ご参加ください Discord YouTube

!!! SQにおけるATRの出口戦略は非常に脆弱である

3件の返信

イーストピース

Customer、bbp_participant、community、sq-ultimate、298件の返信。.

プロフィールを表示

9年前 #116825

Hello, Mark and all,

 

I find that the exit strategies based on ATR in SQ are wrong, except PT and the initial stop-loss.

 

The profit trailing should be based on the highest high or close after entry, if we have a long position.

 

Another important thing is which atr value. It’s not about the atr’s parameters, it’s about the recent  or some bars ago.

 

I have 4 method, and I hope SQ4 would improve the exit strategies with ATR.

 

ファイル atr exit.pngatr exit.png

 

 

 

#Run_By_Bar

Input:                                      
  N(30,5,20,1);
Variables:
  mp(0),
  ATR_before_entry(0),
  tmp(0);
 
MA1:=Ma(c,N);  //average

//entry conditions

bEnterLong := Cross(c,MA1);  
bEnterShort := Cross(MA1,c); 

ATR1 = AvgTrueRange(20);

mp = マーケットポジション;;

if mp=1 and mp[1]<>1 Then Begin
 ATR_before_entry = ATR1[1];
End

//sl1:    highest bar – atr[BarsSinceEntry+1];

hhvbar = highest(high,BarsSinceEntry);
stopline1: hhvbar – 3 * ATR_before_entry,NoDraw,ColorYellow;
PartLine(mp=1 and BarsSinceEntry>=1,stopline1),ColorYellow;

//sl2:     higest bar close – atr[BarsSinceEntry+1]
hhvbar1 = highest(c,BarsSinceEntry);
stopline2: hhvbar1 – 3 * ATR_before_entry,NoDraw,ColorGreen;
PartLine(mp=1 and BarsSinceEntry>=1,stopline2),ColorGreen;

//sl3:    SQ profit trailing
stopline3: close – 3 * AvgTrueRange(20),NoDraw,ColorCyan;
PartLine(mp=1 and BarsSinceEntry>=1,stopline3),ColorCyan;

//sl3:    The ATR Ratchet
Start_Ratchet_Cond = (hhvbar-EntryPrice)>ATR_before_entry;
Ratchet_starter = lowest(low,10);
ratchet_rate = 0.05;
stopline4: Ratchet_starter + ratchet_rate * BarsSinceEntry * AvgTrueRange(10),NoDraw,ColorRed;
PartLine(mp=1 and Start_Ratchet_Cond,stopline4),ColorRed;

If bEnterLong Then Buy;
//If bExitLong Then Sell;
If bEnterShort Then SellShort;
//If bExitShort Then BuyToCover;

0

マビ

Customer、bbp_participant、community、sq-ultimate、252件の返信。.

プロフィールを表示

9年前 #143034

I sincerly hope  that the result from this error is already in the result of the strategies performance given by SQ ?!

0

マーク・フリック

管理者、sq-ultimate、2件の返信.

プロフィールを表示

9年前 #143064

Hello, Mark and all,

 

I find that the exit strategies based on ATR in SQ are wrong, except PT and the initial stop-loss.

 

The profit trailing should be based on the highest high or close after entry, if we have a long position.

 

Another important thing is which atr value. It’s not about the atr’s parameters, it’s about the recent  or some bars ago.

 

I have 4 method, and I hope SQ4 would improve the exit strategies with ATR.

 

what to you mean that they are wrong? It might be implemented differently than is your idea, but it doesn’t make them wrong.

 

Also question about ATR is philosophical – should we use ATR from entry or actual ATR ? Both have their points.

 

But you are right in one thing – it should be possible to add your own trailing exit strategies in SQ4, I’ll think about how to do it.

マーク
StrategyQuantアーキテクト

0

イーストピース

Customer、bbp_participant、community、sq-ultimate、298件の返信。.

プロフィールを表示

9年前 #143196

Sorry, Mark. What I said is not very exact. But I think you could get my meaning.

 

There are many ways to implement  atr’s exit strategy.

 

And I would like to see that SQ4 would support it.

0

3件の返信を表示中 - 1 - 3件目 (全3件中)