| rostifritz |
|
Gold User, Member, TeleChart
|
| Registered User |
|
|
|
|
| Unsure |
|
| Thursday, January 3, 2008 |
| Wednesday, January 18, 2017 12:24:29 AM |
20 [0.01% of all post / 0.00 posts per day] |
|
|
I'm looking to identify stocks in my Personal Criteria Formula that:
1) are priced above $50/share
2) closed lower than the open
3) the closing price was below the midpoint of the high-low range
|
The following formula doesnt show any errors, but it doesn't work correctly either. For instance when I change the first variable that is subtracting "0.5", to say "10.0", it doesn't change the results in backscanner (i.e. the number of winners and losers remian constant). That's problem #1.
Problem #2 - Is there a better way code the close of the 4-day moving average?
If (price.open-.5) < ((price.close(1) + price.close(2) + price.close(3) + price.close(4)) / 4) AndAlso _
price.open < price.low(1) Then pass
|
I seem to have one or more errors, that I can't pinpoint. Can you help?
If price.open < (price.low(1) * 1.2) AndAlso _
(price.close(1)-price.open(1))*.60<price.high(1)-price.low(1) andalso _
price.close(1)>price.open(1) andalso _
(price.close(2)-price.open(2))*.60<price.high(2)-price.low(2) andalso _
price.close(2)>price.open(2) and also _
(price.close(3)-price.open(3))*.60<price.high(3)-price.low(3) andalso _
price.close(3)>price.open(3) andalso _
price.open(2) > price.close(1) andalso _
price.open(2) > price.close(3) then pass
|
|
I was so disappointed that I couldnt get this to work. I did my best, but it shows to have some errors, and I dont know where to look.
If Price.close(1)>price.open(1) andalso _
Price.high(1)-price.close(1)>((price.close(1)-price.open(1))*.01) andalso _
Price.high(1)-price.close(1)<((price.close(1)-price.open(1))*.99) andalso _
Price.open(1)-price.low(1)>((price.close(1)-price.open(1))*.01) andalso _
Price.open(1)-price.low(1)<((price.close(1)-price.open(1))*.99) andalso _
Price.open<price.close(1)*1.49 andalso _
Price.open>price.open(1) then pass
|
|
Perfect! Thank you both.
|
If I want all these conditions to be met simultaneously, do I need to have something more in the code?
If price.open(1) > ((price.high(1) + price.low(1)) / 2) Then pass
If price.close(1) > (((price.high(1) - price.low(1)) * .66) + price.low(1)) Then pass
If price.open(1) > (((price.high(1) - price.low(1)) * .30) + price.low(1)) Then pass
If price.open < (price.high(1) * 1.005) Then pass
|
|
It has been shared as "Negative Return in Win column". The Worst Exit in the Winners column has a negative return of -0.62%. I don't understand why.
|
Why does the BackScanner result show a loss in the win column? Is it perhaps because it takes into account the spead and/or trade fees?
|
I guess it might have a higher priority, but don't know how to tell. I only have two rules and they are:
1) Buy Long at Close 0 Bars from Now.
2) Condition: Trade Length > 0 bars
Action: Exit All at Close 1 Bars from Now
|
|
When I configure BackScanner to exit at Close 1 Bar From Now, it doesnt perform the task correctly. It makes a random exit at either 1 or 2 Bars from Now.
|
|