• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:28pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:28pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Help. EMA Crossover with different EMA cross for exit 0 replies

Different Candle Size Between Different Brokers? 3 replies

Questions on EMA and EMA vs SMA 6 replies

Different Chart Different Direction 4 replies

EMA's and MA's confiming small time correctoin ema's crossing 1 reply

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: EMA different between EA and Chart
Exit Attachments
Tags: EMA different between EA and Chart
Cancel

EMA different between EA and Chart

  • Post #1
  • Quote
  • First Post: Edited 7:46am Jul 1, 2020 7:02am | Edited 7:46am
  •  nigpig
  • Joined Feb 2016 | Status: Member | 386 Posts
EDIT: The solution was that the Tick Date had a setting to offset the hour. Was set to -1.

Hi
I would be grateful for some help with an MA discrepancy.

I'm using the EMA5 Shift 2 and have added it to my tester template.
I'm runing statergy tester using Dukascopy tick data.

The image below shows the red line at 1.30537 which is the EMA5 S2 on the chart.
In my code Im using iMA() to generate the same value but it is different. The value is 1.30413 as shown by the purple line.
This difference is consistant with every bar.

The code I'm using is
Inserted Code
double EMA5S2_1 = iMA(NULL,TimeFrame,5,2,MODE_EMA,PRICE_CLOSE,1);  
Print("Time:" + TimeToStr(iTime(NULL,TimeFrame,1)) + " EMA5S2_1:" + EMA5S2_1 + " TimeFrame:" + TimeFrame);

This produces
0 11:37:50.118 2020.01.28 16:00:02 !TMS5-V1.04 GBPUSD,H4: Time:2020.01.28 12:00 EMA5S2_1:1.30413342 TimeFrame:0
This is the purple line. The parameters are exactly the same yet the values are different.

Can anyone suggest a reason and fix?

Just realised that the purple line value is the next bar value on the chart. Yet at 2020.01.28 16:00 i'm using 1 as the shift so that should be 2020.01.28 12:00.



Attached Image (click to enlarge)
Click to Enlarge

Name: 20200701.png
Size: 38 KB
  • Platform Tech
  • /
  • EMA different between EA and Chart
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023