I would like some help, as I am unable to complete my strategy. My idea is: Buy the NEXT candle that exceeds the maximum of the previous one, as long as we have the following sequence: minimum lower than the previous + minimum higher than the previous, we bought the exceedance of this, but the order is being executed in the current candle and not in overcoming this.
CODE:
Please log in to see this code.
Thank you very much for your help!
Size:
Color:
I have trouble understanding your rules. The highlighted fragment is contradictory and cannot be achieved in real life:
QUOTE:
Buy the NEXT candle that exceeds the maximum of the previous one, as long as we have the following sequence: minimum lower than the previous + minimum higher than the previous, we bought the exceedance of this, but the order is being executed in the current candle and not in overcoming this.
Size:
Color:
Eugene,
Sorry my English, but can you understand the attached image?
I would like to buy when the prices exceed the maximum of this third candle.
Size:
Color:
Hi Rodrigo,
In a Rules-based Strategy you can use the Condition >
Price (or Volume) Action > Price turns up: LowIn code either of these rules would work:
CODE:
Please log in to see this code.
Size:
Color:
Hi Cone,
I can't really apply any of the rules (condition or code). Because I need the sequence of "minimums" to be respected.
Did you understand the entry rule?
Thank you very much for your attention!
Size:
Color:
WL's TurnUp function precisely matches your screenshot.
Size:
Color:
The CumUp.Value equals 1 also precisely matches.
It works because it looks for the first time the series moves up, which means it was previously moving down.
But if you're using rules-base code, just add the Price Turns Up condition, click on it, and select "Low" for the price that turns up.
Size:
Color:
Cone,
thank you very much for your help!
I have programmed my rule, but I need a supplement.
My stop gain would be the ranger between the minimum of candle 2 and the maximum between 3 candles, could you help me in this execution?
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
the minimum of candle 2 and the maximum between 3 candles,
Given that your bar #2 is EntryBar - 1 and bar #3 is EntryBar, it's apparently something like this:
CODE:
Please log in to see this code.
Size:
Color:
Good morning Eugene,
I would like the ranger to be the largest among the 3 bars (automatically) as there will always be a variation of who is the largest in the backtest, as shown in the attached image. it would be possible?
I really appreciate your attention!
Size:
Color:
QUOTE:
the largest among the 3 bars (automatically)
Of course it's possible. The range here is defined as the difference between the highest and lowest prices of the 3-day range from the bar preceding the signal bar:
CODE:
Please log in to see this code.
Size:
Color:
Eugene, perfect!
Once again, I appreciate the help!
Size:
Color:
Glad I could help you Rodrigo!
Size:
Color:
I would like help in creating the rule, with the following conditions:
1 - Closing below the previous 2 candles;
2 - Its closure is greater than its opening (Candle current is green);
3 - Previous candle is red;
How can I ensure the last 2 conditions?
(It can be by rules or code)
Attached example!
CODE:
Please log in to see this code.
Size:
Color:
Here you go
CODE:
Please log in to see this code.
Size:
Color:
Thanks again Eugene, I managed to complete the cod!
Size:
Color:
Glad I could be of assistance!
Size:
Color: