I am running a strategy using: -
- FESX 03-14 contract. 1 minute bar.
- FESX 03-14 contract. 1 dayly bar.
I have ran it using my Sim101 account and real data and there is something wrong I cannot understand. My strategies can open positions in the first/second bar from 1 minute bar chart based on SAR, WMA, CLOSE and HIGH from the last dayly chart session (calculated at Close session). Unfortunately it worked perfectly using historical data but it is a disaster using real time data.
I have debug my code using the next code:
if (CurrentBar < 30)
{
Print("Bar number" + CurrentBar);
Print("Open session value" + OpenSession);
Print("SAR value" + ParabolicSAR(BarsArray[1], 0.02,0.2,0.02)[0]);
Print("WMA value" + WMA(BarsArray[1], periodo)[0]);
in order to print SAR, WMA values for the last session. I was asthonised when I checked out that strategy get Open session value right, but SAR and WMA have different values for each bar at the beggining of session (10-15 bars aprox.). Because SAR and WMA were taken from previous session dayly chart they MUST BE A FIXED NUMBER for the whole next session. Does anyone experience a similar problema or know how to fix it?
Instrument "1" is FESX dayly chart. Thanks in advance,
Fernando
Comment