読み取り専用

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

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

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

ご参加ください Discord YouTube

変数をブール値に設定し、再び変更されるまで保持する

6件の返信

アガット・バウアー

購読者、bbp_participant、コミュニティ、21件の返信。.

プロフィールを表示

9年前 #116329

I’m using a commercial indicator that lacks support for alarms, therefore I reprogrammed it. It’s actually pretty simple: A moving average with 3 levels of ATR are plotted above and below (see screenshot). I want to get a signal when Ask is above or equal to MA + 3times ATR or Bid is below MA – 3times ATR. However, to not getting a signal on every tick when conditions are met, I want to set a boolean variable to false after the first detection of the signal and only allowing the signal again, after one bar has closed within the “borders”, the Boolean variable is reset to “true”.

 

For backtesting purposes, I went for +/- 1times ATR to get more signals. Right in the middle of the screenshot, you can easily spot an area, where short signals (red) are plotted that shouldn’t be allowed by the “reset” function (green) that resets the bool var to true. Why is this?

 

If anyone is kind enough to check on this, I attached the sqw file, too.

 

 

 

 

One more question: Is there any way to have values of variables plotted right on the chart for debugging purposes?

ファイル ATR_Alarm_2.sqw

0

Tomas Matejka

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

プロフィールを表示

9年前 #141557

こんにちは,

 

sure, I will check the project and let you know

0

Tomas Matejka

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

プロフィールを表示

9年前 #141586

こんにちは,

 

did you export the project to an Expert Advisor or a Signal Indicator?

0

アガット・バウアー

購読者、bbp_participant、コミュニティ、21件の返信。.

プロフィールを表示

9年前 #141592

I exported to a Signal Indicator.

0

アガット・バウアー

購読者、bbp_participant、コミュニティ、21件の返信。.

プロフィールを表示

9年前 #141609

I still can’t find my mistake.

0

Tomas Matejka

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

プロフィールを表示

9年前 #141679

こんにちは,

 

you can try to export it as an expert advisor and see how it works then for you. It still can only draw arrow up or down with no trading. There seems to be with a difference in code evaluation when exported as the signal indicator

0

アガット・バウアー

購読者、bbp_participant、コミュニティ、21件の返信。.

プロフィールを表示

9年前 #141810

Thank you! I will fix it by hand.

0

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