i´m new to ninja script. the last couple of days i read through the ninja guide and created some strategies, which a working fine. but now i have some problems and need some help.
i have the following code created
{
if (CrossAbove(High, Swing(8).SwingHigh, 1))
EnterLong;
}
now, i know when i backtest this strategy i will get my entrys only on the next bars open after the above code is true. until here, it works.
but now i want to add another timeframe. so i added a PeriodType.Minute, 1. i want to create a code that says: if the high from the 1 Minute bars object crossabove the last swinghigh from the primary bars 15 min., then enter a long position. but i dont get the correct entrys.
{
if (BarsInProgress == 1)
if (CrossAbove(High, Swing(8).SwingHigh[0], 1)
EnterLong();
}
can someone help me out. thank you.


Comment