B135 - Calculation values NOK

I think the below image explains the issue, I want a long entry when the close is below the close of the x bars minus ATR.
Please check also the calculations when we use i.e. log(close) < 0.5 because on the other day I notice a issue with this SQx is rounding up the values...



Attachments
image-0.png
(163.27 KiB)
SQx_Strat_bug.sqx
(5.61 KiB)
  • Votes +5
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

M
#1

MM1

25.03.2022 11:31

Task created

M
#2

MM1

25.03.2022 11:32
Voted for this task.
E
#3

Emmanuel

25.03.2022 12:11
Voted for this task.
HH
#4

Hans

29.03.2022 00:42
Voted for this task.
KB
#5

kbtech

11.07.2022 01:25
Voted for this task.
o
#6

Enric

01.08.2022 11:51
Voted for this task.
g
#7

Lee Guan Chuan

16.09.2022 02:19

Status changed from New to Fixed

Attachment image-0.png added

Attachment image-1.png added

Attachment Strategy.sqx added

image-1.png
(38.85 KiB)
Strategy.sqx
(3.05 KiB)
image-0.png
(61.09 KiB)

Hi MM1,


I can the strategy you sent to us is in MT5.


Close[0] is the Open of the candle due to 0 is the latest candle in MT.

Refer the Pic(1), When you use Close[0] during the bar open and want the Close[0] to be larger than the Lowest.


Refer the Pic(2), expecting Close[0] to be smaller than the lowest.


Due to Close[0] being the Open of the candle when executing, there is a chance that Close[0] can be similar to the last low which makes both conditions doesn't work.


I'm not sure am I understand you correctly. Please let me know if I don't


I also attached a strategy that enters a long entry when the close is lower than the last X Low minus ATR. I hope it helps.


Votes: +5

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please