How to pick specific values from dataframe for trade entry validation? #811
CadeHalcyon
started this conversation in
General
Replies: 1 comment
-
I figured out how to do this another way by adding a "pct change" indicator using pandas:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I always caveat my requests with the statement "I am new to coding", which is true! Grateful for any help here, and please respond with as if talking to a layman / newbie to coding! Thanks.
#note: dataframe includes 1 mins candle data - 1,440 rows per 24hr session/period
`class Indicator_Strategy(Strategy):
#define a few variables for trade entries and/or bt.optimize
_hour = 1 #first hour of 24hr trading session to support trading session open (per def next(self):)
_minute = 1 #first min of 24hr trading session to support trading session open (per def next(self):)
_Indicator_up_change = 1.05 #used to reference a 5% increase in the Indicator value from one session to next
_Indicator_down_change = 0.95 #used to reference a 5% decrease in Indicator value from one session to next
Beta Was this translation helpful? Give feedback.
All reactions