cleanup
This commit is contained in:
parent
c2ddfc0536
commit
a02a7c288c
@ -25,7 +25,7 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import plotly.express as px
|
import plotly.express as px
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,8 +25,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
|
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
class ADXI:
|
class ADXI:
|
||||||
@ -165,8 +165,8 @@ class ADXI:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
|
|
||||||
|
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
|
|
||||||
class Alligator:
|
class Alligator:
|
||||||
@ -110,5 +110,5 @@ class Alligator:
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -24,8 +24,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -104,5 +104,5 @@ class IDC:
|
|||||||
|
|
||||||
|
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -24,8 +24,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
class Envelopes:
|
class Envelopes:
|
||||||
|
|
||||||
@ -120,5 +120,5 @@ class Envelopes:
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -24,9 +24,9 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
import Ind_Alligator
|
import market_trade.core.Ind_Alligator
|
||||||
|
|
||||||
class Gator:
|
class Gator:
|
||||||
|
|
||||||
@ -104,5 +104,5 @@ class Gator:
|
|||||||
|
|
||||||
|
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -25,7 +25,7 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
import CoreDraw
|
import CoreDraw
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import plotly.express as px
|
import plotly.express as px
|
||||||
|
|
||||||
|
|
||||||
@ -183,6 +183,6 @@ class Ishimoku:
|
|||||||
|
|
||||||
})
|
})
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
#print(ans)
|
#print(ans)
|
||||||
return ans
|
return ans
|
||||||
|
|||||||
@ -25,8 +25,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
|
|
||||||
class LRI:
|
class LRI:
|
||||||
@ -100,5 +100,5 @@ class LRI:
|
|||||||
|
|
||||||
})
|
})
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -25,8 +25,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
class ISTD:
|
class ISTD:
|
||||||
def __init__(self, base_df,options={}, needFig=False,showOnlyIndex=True,drawFig=False):
|
def __init__(self, base_df,options={}, needFig=False,showOnlyIndex=True,drawFig=False):
|
||||||
@ -84,5 +84,5 @@ class ISTD:
|
|||||||
|
|
||||||
})
|
})
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -25,8 +25,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
class Stochastic:
|
class Stochastic:
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ class Stochastic:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
|
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,8 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
|
|
||||||
|
|
||||||
class BB:
|
class BB:
|
||||||
@ -105,5 +105,5 @@ class BB:
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.figDict=req
|
self.figDict=req
|
||||||
ans = CoreDraw.coreDraw(req,drawFig)
|
ans = market_trade.core.CoreDraw.coreDraw(req,drawFig)
|
||||||
return ans
|
return ans
|
||||||
@ -24,20 +24,20 @@ from plotly.offline import init_notebook_mode, iplot
|
|||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
init_notebook_mode()
|
init_notebook_mode()
|
||||||
|
|
||||||
import market_trade.CoreTraidMath
|
import market_trade.core.CoreTraidMath
|
||||||
import market_trade.CoreDraw
|
import market_trade.core.CoreDraw
|
||||||
import market_trade.Ind_bollingerBands
|
import market_trade.core.Ind_bollingerBands
|
||||||
import Siganls.coreSignal
|
import market_trade.signals.coreSignal
|
||||||
|
|
||||||
|
|
||||||
class SignalB_B_1(Siganls.coreSignal):
|
class SignalBollingerBands1(market_trade.signals.coreSignal):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
IndDict={},
|
IndDict={},
|
||||||
mode='retro',
|
mode='retro',
|
||||||
):
|
):
|
||||||
super().__init__(name='1.1',mode=mode,target='nextBar',valeType='price')
|
super().__init__(name='1.1',mode=mode,target='nextBar',valeType='price')
|
||||||
self.IndDict=IndDict
|
self.IndDict=IndDict
|
||||||
self.BB=Ind_bollingerBands.BB(
|
self.BB=market_trade.core.Ind_bollingerBands.BB(
|
||||||
IndDict['BB']['df'],
|
IndDict['BB']['df'],
|
||||||
IndDict['BB']['params'],
|
IndDict['BB']['params'],
|
||||||
IndDict['BB']['needFig'],
|
IndDict['BB']['needFig'],
|
||||||
37
tools/test_signal.py
Normal file
37
tools/test_signal.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
"""
|
||||||
|
Signal_1
|
||||||
|
BB
|
||||||
|
синал
|
||||||
|
предсказывающий
|
||||||
|
будет
|
||||||
|
ли
|
||||||
|
цена
|
||||||
|
за
|
||||||
|
следубщий
|
||||||
|
бар
|
||||||
|
больше\меньше
|
||||||
|
цены
|
||||||
|
закртыия
|
||||||
|
текущего, если
|
||||||
|
текущиий
|
||||||
|
бар
|
||||||
|
закрылся
|
||||||
|
ниже\выше
|
||||||
|
диапазона
|
||||||
|
BB
|
||||||
|
"""
|
||||||
|
|
||||||
|
import market_trade.signals.Signal1
|
||||||
|
|
||||||
|
df_candle = []
|
||||||
|
ind_params = {'MeanType': 'SMA', 'window': 5, 'valueType': 'low', 'kDev': 2}
|
||||||
|
# df_candle[:3000],ind_params,True,False,True
|
||||||
|
# window 5..100 (5) | valueType: 'open', 'low' | 'kdev' : 1..4 (0.1)
|
||||||
|
indEl1 = {
|
||||||
|
'df': df_candle[:3000],
|
||||||
|
'params': ind_params,
|
||||||
|
'needFig': False,
|
||||||
|
'showOnlyIndex': False,
|
||||||
|
'drawFig': True
|
||||||
|
}
|
||||||
|
a = market_trade.signals.Signal1.SignalBollingerBands1({'BB': indEl1})
|
||||||
Loading…
x
Reference in New Issue
Block a user