milanese wrote:TraderDesk wrote:Below I would like to consider the middle of the HA boxes to be the line.
HALinedefinition.png
ok try if this one is as you intended, the C version needed x red bars after cross for open short, this one should open too if we have greenbar in the series..and I changed the var names as you wanted..
Cheers
Tommaso
Tommaso, I have it working now based on the bars. Good so far. I will post more functionality that will be needed later for this function.
Now I have below the function "Add additional positions in Trend". This is to be used once the first position is taking with the previous function. The below function will be to add additional positions as needed in the trend as long as price does not close above the HA line... I have added three configurations:
1. Amount of pips to be in proximity of HA line
2. Wait X amount of bars before opening another position
3. Max Amount of open positions allow concurrently
This will allow a position to be opened up once price comes within x amount of pips to HA line. So for example Price cross down the HA line and a new position opened up after 2 bars closed. That occurs from the first function. Now I would use the second function (Amount of pips to be in proximity of HA line) to configure wait (DelayAddOpenPositionForXBars) X bars to close from last buy/sell position before opening an additional position AND if Price is with X amount of pips of HA line AND maximum amount of positions currently open does NOT exceed X amount (MaxAmountPositions).
AddadditionalpositionsinTrend.png
Am I making sense here?
You do not have the required permissions to view the files attached to this post.