EMA with a horizontal and verticle shift
05/11/2022 at 4:07 PM #19306105/11/2022 at 6:32 PM #19307105/11/2022 at 8:44 PM #193074
thanks, and if i wanted a verticle shift down would it be
ExponentialAverage(close) – 0.034 ?
also does return y needed to be coded underneith? if i was coding using ema3 as the name should it be this…
ema3 = ExponentialAverage(close) + 0.034
return ema305/11/2022 at 8:56 PM #19307605/11/2022 at 9:48 PM #19307905/11/2022 at 9:59 PM #19308005/12/2022 at 11:24 AM #19310605/12/2022 at 11:57 AM #19310705/12/2022 at 12:56 PM #193113
Example Trading System with EMA3
EMA3Plus = ExponentialAverage(close) + 0.034
EMA3Min = ExponentialAverage(close) – 0.034
If Close Crosses Over EMA3Plus then
Buy 1 contract at market
ElsIf Close Crosses Under EMA3Min then
SellShort 1 contract at market
Graph EMA3Plus as “EMA3Plus”
Graph EMA3Min as “EMA3Min”05/12/2022 at 2:36 PM #193127
yes its is to detect conditions for one line bing over the other by a set distance. I have the code i’m just looking to find the correct way to set up the verticle and horizontal shift. The return was new to me but showed up as an error when i tried to implement05/12/2022 at 9:38 PM #19313305/14/2022 at 1:53 PM #19317905/18/2022 at 4:34 PM #19339305/18/2022 at 11:42 PM #193417
Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Please abide by the rules highlighted in yellow (below).
Thank you 🙂05/18/2022 at 11:52 PM #193418
With RETURN you can only move the indicator to the left, i.e. the past value is plotted currently (not in the future, though), such as:12Sma = Average[20,0](close)RETURN Sma
you cam shift both ways using graphic instructions (DrawSegment) by:
– repainting current data into the past
– plotting cuurrent data into the future.
In any case each indicator must be programmed to behave this way.