Ask for help on pyramiding

Author: CryptoLiu, Created: 2022-11-17 09:00:59, Updated:

strategy ((title = the pump gets more signals, enters the pump in multiple positions, pyramding = 5) if longCondition and strategy.position_size <= 0 strategy.entry ((open more than one entry, strategy.long, when = lowLong, amount = amount, comment = open more than one entry)) if strategy.position_size > 0 and lowShort strategy.close_all (comment = strategy.close_all)

This code is my strategy execution code. I want to implement that when triggering a long condition signal and triggering a small level multi-head signal, open a position once, and then trigger a small level blank head signal for a one-time placement, similar to Martin. But when I write the retest, I find that this writing can only trigger the first opening, because after opening it does not satisfy the position less than 0, how to adjust the ratio is more appropriate?If the indicators below, such as the green line indicator gold fork is my longCondition signal, the four green arrow positions are the lowLong signal, the red arrow is the lowShort signal, how can I achieve the green clip gold fork more consecutive entries?


More

The Little DreamThe first problem is that if you ignore the pyramding parameter, you can change the subroutine strategy.entry to strategy.order, which ignores the number of times it can be loaded. What's up? strategy ((title = "get more signals, get into more positions") if longCondition and strategy.position_size >= 0 strategy.order (("open more", strategy.long, when = lowLong, amount = amount, comment = "multiple openings") if strategy.position_size > 0 and lowShort strategy.close_all (comment = "multiple heads") What's up? I don't think that's going to work.

The Little DreamThen you can use the entry function to set the pyramding parameter.

CryptoLiuIt's also not ignoring the pyramiding argument, the previous code was that you can't have multiple parallels, and you gave me a feedback that you can have multiple parallels. If so, how do you limit the maximum number of parallels?