Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
I'm new, can somebody help?

Hi as ı said ım new at this algoritmich thing,ı have two questions.

1- how can ı state dips and bottoms in quantopian,let me explain with example:

lets say apple make new high 200$ ı want that if stock goes down more than %1 from 200 $ short or long stock Or let's say that apple has decreased rapidly to 190$ from that point,ı want to accept 190$ as a new dip and if stock goes %1 goes up from 190 ı want short or long.Can any one help how can ı do this ? :)

2-I dont actually understand how schedule funtion work,let's say that ı write code which employed simple strategy,like if 8 ema crossover 21 ema,long.and ı dont want to close my position until 21 ema cutdown 8 ema,what should ı do with schedule_function in this case ?