I have a very simple study which I use to trigger submit order for /MES if the study return true. I have use it in my paper trading account for 5 or 6 months. and it always worked. but today it didn't trigger the order.
The study code is as following:
When the current time is between market start time and market end time the study return true. So I can put the order in before I go bed. and let it wait until the market open then submit the order. and close the position when the market close. it works find most of the time since last Oct. The only time it failed was due to it was set to trade /MESZ22 and the market switched to /MESM23. I just need to change the simbol then it back to business. Today I have checked the /MES it still trading /MESM23 today. I have no clue why it didn't triger.
Is anyone could help me figure out what is going on?
Thanks in advance.
Chris
The study code is as following:
Code:
script MarketHour {
def AfterStart = GetTime() > RegularTradingStart(GetYYYYMMDD());
def beforeEnd = GetTime() < RegularTradingEnd(GetYYYYMMDD());
plot MarketHour = AfterStart and beforeEnd;
}
plot Data = MarketHour() is true;
When the current time is between market start time and market end time the study return true. So I can put the order in before I go bed. and let it wait until the market open then submit the order. and close the position when the market close. it works find most of the time since last Oct. The only time it failed was due to it was set to trade /MESZ22 and the market switched to /MESM23. I just need to change the simbol then it back to business. Today I have checked the /MES it still trading /MESM23 today. I have no clue why it didn't triger.
Is anyone could help me figure out what is going on?
Thanks in advance.
Chris
Last edited by a moderator: