- ago
I am beginner and could someone help me to construction a strategy please? I would like to buy when hilo (6) turns up (weekly), next candle. Sell when candle close above dolchian (5) chanel. thank you

0
581
Solved
16 Replies

Reply

Bookmark

Sort
- ago
#1
You can build it using Blocks but first we need to clear some confusion:

1. What's HiLo? There are at least three indicators with that in their name.
2. Is this intended to run on all Weekly data or on Daily, using the indicator's compressed version?
3. The price doesn't seem to cross above the Donchian Channel on the right edge of your chart. Rather below. Correct?
1
- ago
#2
1. The Gann HiLo Activator is a simple moving average of the previous three periods highs or lows. Based on the moving averages logic, it is a trend-following indicator used to reflect the markets direction of movement.

2. Only weekly

3. Entry

Buy when hilo activator (6) turns up, opening the next candle.

exit

Seel when candle close under dolchian (5) channel, opening next candle

1
- ago
#3
Great, thanks for the clarification. Here's a how-to:

1. Create a new Building Block strategy.
2. Switch its Data Scale to Weekly ("Strategy Settings").
3. Choose "Indicator Turns" for the entry, taking the 3-period SMA of AveragePriceHL (instead of Close).
4. For the sell based on the DoNchian channel, choose "Indicator crosses Indicator" with Close being the first and Lowest(5) being the second indicator.
0
- ago
#4


only made entries and did not execute any exits
1
Glitch8
 ( 7.90% )
- ago
#5
Here is how to implement your strategy in Building Blocks,

1
Best Answer
- ago
#6
In order to learn more about the GannHiLoActivator, I converted the block solution in Reply# 5 (I only do code, not blocks.) to the code version below to play with. Please feel free to make corrections or improvements.
CODE:
using WealthLab.Backtest; using WealthLab.Core; using WealthLab.Indicators; using WealthLab.TASC; namespace WealthScript1 {    public class GannHiLoActDemo : UserStrategyBase    // www.wealth-lab.com/Discussion/Buy-when-HiLo-turns-up-10175    {       Parameter lowestPeriod, gannHiLoActPeriod;       IndicatorBase gannHiLoAct,lowest;       public GannHiLoActDemo()       {          lowestPeriod = AddParameter("Lowest period", ParameterType.Int32, 5, 2, 8);          gannHiLoActPeriod = AddParameter("GannHiLoAct period", ParameterType.Int32, 6, 2, 10);       }       public override void Initialize(BarHistory bars)       {          gannHiLoAct = new GannHiLoActivator(bars,gannHiLoActPeriod.AsInt,false);          PlotIndicator(gannHiLoAct);          lowest = new Lowest(bars.Low,lowestPeriod.AsInt);       }       public override void Execute(BarHistory bars, int idx)       {          if (HasOpenPosition(bars, PositionType.Long))          {             //code your sell conditions here             if (bars.Close[idx] < lowest[idx-1])                PlaceTrade(bars, TransactionType.Sell, OrderType.Market, default, "lowest sell");          }          else          {             //code your buy conditions here             if (gannHiLoAct.TurnsUp(idx))                PlaceTrade(bars, TransactionType.Buy, OrderType.Market, default, "GannHiLo upturn buy");          }       }    } }
1
- ago
#7

Glitch thank you so much.

Great Good job,

But, Can you adjust only the entrie? The entry is 1 week after turn up.

Exit is perfect.




1
Glitch8
 ( 7.90% )
- ago
#8
You can do it yourself. Drag a Qualifier "N Bars Ago" on top of the Entry Condition and make sure it's set to "1 Bar Ago."
1
- ago
#9
Thank you so much guys.
0
- ago
#10
Hello,

Dragged a Qualifier "AND Bars Ago", and my entry is still wrong.

I need to entry after the hiLo activator changes, so I'm going to entry next week (opening market).

I tried a lot, but i couldnt get it.
0
Cone8
 ( 3.78% )
- ago
#11
What did you do?
Make screenshot of the strategy and post the image.

Nevermind.. I think I see what you really want. The requirement is when the Close crosses over the HiLo. That's not when the HiLo "turns up".

Use the "Indicator Crosses Indicator" condition:
Closes Crosses Over [HiLo] - I'm not sure which indicator you're using here
0
- ago
#12
easy, hilo turns up, (buy), but I don't think you have this indicator, I think it's a little different to what we use in Brazil. thank you anyway.
0
Glitch8
 ( 7.90% )
- ago
#13
Can you point to a web page describing the indicator?
0
- ago
#14
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/G-L/HiLoActivator
0
Cone8
 ( 3.78% )
- ago
#15
It's here -

0
Glitch8
 ( 7.90% )
- ago
#16
So yes, we do have the indicator. What exactly are we missing here?
0

Reply

Bookmark

Sort