I would like to know how I can code an order entry system based on the crossover of 2 daily moving averages ?
The entry must be opened and closed intraday but the data for the MA is caculated on the daily bars.
How do I specify the difference in my code between daily and intraday ?
Thank you.
Daily bar calculation but intraday order entry [SOLVED]
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Daily bar calculation but intraday order entry
I would like to know how I can code an order entry system based on the crossover of 2 daily moving averages ?
The entry must be opened and closed intraday but the data for the MA is caculated on the daily bars.
How do I specify the difference in my code between daily and intraday ?
Thank you.
One way to do it is with 2 data series:
an intraday series for order execution, and a daily series for strategy calculation.
see post #4
Multi-data strategy... pg. 34
viewtopic.php?f=16&t=6929
Re: Daily bar calculation but intraday order entry
Ok thanks for the suggestion.
If I want to use it with a stochastic or some other indicator and having the indicator on the daily what should I use ?
Can you give an example of how you define the data series ?
would using this : ATR (Close Data2) be good ? and I would need to put Data2 as an input ?
Than you.
If I want to use it with a stochastic or some other indicator and having the indicator on the daily what should I use ?
Can you give an example of how you define the data series ?
would using this : ATR (Close Data2) be good ? and I would need to put Data2 as an input ?
Than you.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Daily bar calculation but intraday order entry [SOLVED]
Based on your questions, you have not read my suggested post #4 in the above link. Everything you asked for is there.Ok thanks for the suggestion.
If I want to use it with a stochastic or some other indicator and having the indicator on the daily what should I use ?
Can you give an example of how you define the data series ?
would using this : ATR (Close Data2) be good ? and I would need to put Data2 as an input ?
Than you.
note. I do not give examples if there is one in the manual.
-
- Posts: 87
- Joined: 10 Feb 2022
- Has thanked: 53 times
- Been thanked: 11 times
Re: Daily bar calculation but intraday order entry
Hello, I'm new to the MS scene. And I haven't been able to find the right answer to my question, although I've looked at all the links here. Maybe it's because English isn't my strength or I skipped it.
I would like to use e.g. 2 SMA on a daily basis also for the intraday analysis, so as to later build a strategy from it. But now I don't want to have to open the corresponding shares in the daily chart and e.g. in the hourly chart every time. (I know how to do this in MS manually).
My goal is to analyze several stocks intraday using daily data (SMA s).
So always open / use the associated daily data automatically for my intraday analysis.
Then another question in the screener can you add only 1 condition, how can I add more conditions there, is there an example programming somewhere?
I would like to use e.g. 2 SMA on a daily basis also for the intraday analysis, so as to later build a strategy from it. But now I don't want to have to open the corresponding shares in the daily chart and e.g. in the hourly chart every time. (I know how to do this in MS manually).
My goal is to analyze several stocks intraday using daily data (SMA s).
So always open / use the associated daily data automatically for my intraday analysis.
Then another question in the screener can you add only 1 condition, how can I add more conditions there, is there an example programming somewhere?
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Daily bar calculation but intraday order entry
You might think your logic is on a daily basis, but you are trading on an intraday basis.
So your analysis must use intraday methods.
So your analysis must use intraday methods.
-
- Posts: 87
- Joined: 10 Feb 2022
- Has thanked: 53 times
- Been thanked: 11 times
Re: Daily bar calculation but intraday order entry
first of all thanks for the answer.
All the values I have mentioned (time/SMA etc.) are of course only examples, the ideal values still need to be found out.
So you think I should simply convert the 1 hour candles into daily candles on the intraday chart, for example, and then use this to build the SMA for my strategy?
I had thought about that too, but I would have thought that there had to be another way.
For example, if I want to use a 200SMA, I also need 200 candles "forward" to be able to form this. 1 additional year of intraday data costs more than 1 year of daily data
I would have thought that there was a function to always load the associated daily data directly into the intraday chart and use it for analysis/trading.
All the values I have mentioned (time/SMA etc.) are of course only examples, the ideal values still need to be found out.
So you think I should simply convert the 1 hour candles into daily candles on the intraday chart, for example, and then use this to build the SMA for my strategy?
I had thought about that too, but I would have thought that there had to be another way.
For example, if I want to use a 200SMA, I also need 200 candles "forward" to be able to form this. 1 additional year of intraday data costs more than 1 year of daily data
I would have thought that there was a function to always load the associated daily data directly into the intraday chart and use it for analysis/trading.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Daily bar calculation but intraday order entry
Developing a system is about experiments and experiments and experiments and . . .
You have to try all permutations to see which one works best for you.
You have to try all permutations to see which one works best for you.
-
- Posts: 87
- Joined: 10 Feb 2022
- Has thanked: 53 times
- Been thanked: 11 times
Re: Daily bar calculation but intraday order entry
Yes, that's right
But that still doesn't answer my two questions, about the scanner and whether there is a way to automatically load the associated daily data on the intraday chart.
For example, I want to use a pre-filter from SMA on a daily basis and then automatically open/close positions intraday according to another strategy etc...
Of course, if it doesn't work, as I said, I will use intraday data to form a daily SMA, but this may lead to deviations.
But that still doesn't answer my two questions, about the scanner and whether there is a way to automatically load the associated daily data on the intraday chart.
For example, I want to use a pre-filter from SMA on a daily basis and then automatically open/close positions intraday according to another strategy etc...
Of course, if it doesn't work, as I said, I will use intraday data to form a daily SMA, but this may lead to deviations.