Indicator from daily bars from signal based on 1 minute bars
Indicator from daily bars from signal based on 1 minute bars
Hi, I have developed a signal based on one minute bars. Now I want to add an indicator (50 day moving average) to my signal base on daily close bars. I want to trade in the direction of the trend, indicated by the 50 day moving average. How do I code an indicator base on daily bars to my signal that is using one minute bars? Thanks.
Re: Indicator from daily bars from signal based on 1 minute bars
Just write your own indicator using CloseD(x) as Close of the Day. The Plot2 is just for comparison so you see that it has the same data
Code: Select all
inputs:
MaLen(10);
variables:
MaIndi(0),
var0(0),
Ma2Indi(0);
///////Indi for M1
MaIndi=0;
for var0=1 to MaLen
begin
MaIndi=MaIndi+CloseD(var0);
end;
MaIndi=MaIndi/MaLen;
////////Indi for D1
Ma2Indi=Average(c,MaLen)data2;
Plot1(MaIndi,"MaM1");
Plot2(Ma2Indi,"MaD1");
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Indicator from daily bars from signal based on 1 minute bars
Hi, I have developed a signal based on one minute bars. Now I want to add an indicator (50 day moving average) to my signal base on daily close bars. I want to trade in the direction of the trend, indicated by the 50 day moving average. How do I code an indicator base on daily bars to my signal that is using one minute bars? Thanks.
See post #18
Multi-data strategy... pg. 43
viewtopic.php?f=16&t=10811
Re: Indicator from daily bars from signal based on 1 minute bars
I dont think that multidata does apply here since he just wants to use one data stream and that is M1 so using CloseD(x) to rewrite the indicator is the best way to go.
On my example above the data2 stream was just to compare that the CloseD(x) Plot1 was working right.
On my example above the data2 stream was just to compare that the CloseD(x) Plot1 was working right.