Hi Anant Sir / Happy Sir
This is my code so far. I have made some modifications.
It will only show trade after Candle Close, How can I fix the code to work in such a way that it should show me trade as soon as the breakout happens. Secondly Please check the above posted exploration, It shows me trade every 15 minutes while in real time code works fine.
PS: I tried copy pasting couple of times, for some weird reason traderji is not letting post H [ i ]
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("MSNOBR");
SetChartOptions(0, chartShowDates | chartWrapTitle);
SetBarsRequired(sbrAll);
FontSize = Param("Font Size", 11, 8, 36, 1);
GfxSelectFont("Arial", FontSize);
GfxSetTextColor(colorWhite);
GfxSetBkColor(colorBlue);
NewDay = Day() != Ref(Day(), -1);
H15 = ValueWhen(NewDay, TimeFrameGetPrice("H", in15Minute));
L15 = ValueWhen(NewDay, TimeFrameGetPrice("L", in15Minute));
BI = ValueWhen(NewDay, BarIndex(), 1);
GfxTextOut("Opening Bar High: " + StrFormat("%1.2f", LastValue(H15)), 0, 25);
GfxTextOut("Opening Bar Low : " + StrFormat("%1.2f", LastValue(L15)), 0, 45);
trade_no=0;
x=0;
y=0;
if (trade_no<1)
{
for(i = LastValue(BI); i < BarCount - 1; i++)
{
if (H > H15)
{
Buy= H15;
GfxTextOut( "Buy Order Exectuted at " + StrFormat("%1.2f", H15), 0,65);
trade_no=1;
x=1;
break;
}
if (L < L15)
{
Short= L15;
GfxTextOut( "Short Order Exectuted at " + StrFormat("%1.2f", L15), 0,85);
trade_no=1;
y=1;
break;
}
}
}
if (trade_no>0 AND x>0)
{
for(i = LastValue(BI); i < BarCount - 1; i++)
{
if (L < L15)
{
Sell = L15;
GfxTextOut( "Sell Order Exectuted at " + StrFormat("%1.2f", L15), 0,105);
break;
}
}
}
if (trade_no>0 AND y>0)
{
for(i = LastValue(BI); i < BarCount - 1; i++)
{
if (H > H15)
{
Cover = H15;
GfxTextOut( "Cover Order Exectuted at " + StrFormat("%1.2f", H15), 0,125);
break;
}
}
}
_SECTION_END();