Here is my Strategy. I am putting this on a 1 m Chart assuming Primary Bar Object.
protected override void Initialize()
{
Add(PeriodType.Minute,3);
CalculateOnBarClose = true;
Enabled=true;
}
protected override void OnBarUpdate()
{
if (CurrentBars[0] <= BarsRequired ||CurrentBars[1] <= BarsRequired)
return;
if (BarsInProgress==0)
{
if (Closes[0][0] > Opens[0][0])
{
if ( Closes[0][0] > Opens[1][0] )
Print(" Both CandleSticks on my 2 TimeFrames are Green");
}
}
}
Compiles fine, but can not get anything to print. Played around with BarInProgress many times, even CalculateOnClose too! Maybe did not cover every permutation.
Just need the language to take data on 2 TimeFrames and put them into conditional statments and get a so called action from them.
Do I have to wait for 1m Tick and try process that in one statement, keep the answer in a boolean variable, then wait for another 3m Tick, then process that in a conditional statement. Then process both the answers from the 1m & 3m conditional statement into another conditional statement, to have desired action based on both Time Frames?
Comment