Skip to content

Plot organization and indicator grouping #88

Closed
@sidsidsidsid

Description

@sidsidsidsid

Strategy1 below:
I noticed that an overlayed plot would be created for self.m1, self.m2, and self.m3, and candlestick. But, 3 plots will be created for each self.m4, self.m5, and self.m6. Is there a way to overlay a second plot that would combine self.m4, self.m5, and self.m6?

Strategy2 below:
If the above is not possible, I have an enhancement request. Add a flag to selfI() that tells how the plots should be organized. A flag would tell the grouping/overlays and the order of the plots. See below

class Strategy1(Strategy):
    def init(self):
        Close = self.data.Close
        self.m1  = self.I(Indicator_1, Close)
        self.m2  = self.I(Indicator_1, Close)
        self.m3  = self.I(Indicator_1, Close)
       
	Var = (self.data.High + self.data.Close) * 100
        
        self.m4  = self.I(Indicator_2, Var)
        self.m5  = self.I(Indicator_2, Var)
        self.m6  = self.I(Indicator_2, Var)

     def next(self):
        ...

class Strategy2(Strategy):
    def init(self):
        Close = self.data.Close
        self.m1  = self.I(Indicator_1, Close,overlay_group=1)
        self.m2  = self.I(Indicator_1, Close,overlay_group=1)
        self.m3  = self.I(Indicator_1, Close,overlay_group=1)
       
	Var = (self.data.High + self.data.Close) * 100
       
        self.m4  = self.I(Indicator_2, Var,overlay_group=2)
        self.m5  = self.I(Indicator_2, Var,overlay_group=2)
        self.m6  = self.I(Indicator_2, Var,overlay_group=2)

     def next(self):
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions