読み取り専用

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

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

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

ご参加ください Discord YouTube

Can coders help with this support/resistance price code?

2件の返信

ジェイソン

顧客、bpb_participant、sq-ultimate、65件の回答。.

プロフィールを表示

6年前 #262623

I have a simple code I have used in ProRealTime that does a really good job of following the support/resistance troughs and peaks of a trending price:

PivotBAR = 4
LookBack = 6
BarLookBack = PivotBAR+1

IF low[PivotBAR] < lowest[LookBack](low)[BarLookBack] THEN
IF low[PivotBAR] = lowest[BarLookBack](low) THEN
ThirdSupportPrice=PrevSupportPrice
PrevSupportPrice=SupportPrice
SupportPrice = low[PivotBAR]
ENDIF
ENDIF

IF high[PivotBAR] > highest[LookBack](high)[BarLookBack] THEN
IF high[PivotBAR] = highest[BarLookBack](high) THEN
ThirdResistancePrice=PrevResistanceprice
PrevResistancePrice=ResistancePrice
ResistancePrice = high[PivotBAR]
ENDIF
ENDIF

return supportprice, resistanceprice

 

Is this something could be done with algo wizard to create a custom block that would allow the randomisation of pivot bar and look back parameters maybe?

添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

Tomas Matejka

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

プロフィールを表示

6年前 #266689

こんにちは,

you need to assign prices to ThirdResistancePrice and other variables so you cannot directly create a custom block for all this.

It is easy to setup a template though that will be used to build new strategies. The parameters can be set to be randomly generated (within pre-define value range)

Check this https://strategyquant.com/doc/strategyquant/strategy-templates/ and this https://strategyquant.com/blog/introduction-strategyquant-templating-system-part/

 

0

ジェイソン

顧客、bpb_participant、sq-ultimate、65件の回答。.

プロフィールを表示

6年前 #266711

Thanks Tomas the links were helpful.

So I put the code together as a template in Algo Wizard as per the code in my original post (short trades only just to start). I’ve attached the file.

However it does not make any trades. I’ve checked the template and looks OK. Maybe its something to do with how SQX assigns the value in ‘Rule 6’?

添付ファイル:
に違いない ログインしました 添付ファイルを表示するには.

0

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