Hello,
I want to develop a simple program, but I have enough programming knowledge. Someone can help me?.
I wrote this code by copying from other systems,
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
SetChartBkColor(ParamColor("Outer panel color ",colorWhite)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel color upper half", colorWhite),ParamColor("Inner panel color lower half",
colorWhite)); //color of inner panel
_SECTION_BEGIN("CCI");
periods = Param( "Periods", 14, 2, 200, 1 );
x= CCI( periods );
_SECTION_BEGIN("QQE");
// QQE (Quantative Qualitative Estimation)
QQE_Periods = Param("Period", 14, 3, 30, 1 );
QQE_SF = Param("Smoothing factor", 5, 1, 30, 1 );
QQE_RSI_MA = EMA(RSI(QQE_Periods),QQE_SF);
QQE_ATR_RSI = abs(Ref(QQE_RSI_MA,-1)-QQE_RSI_MA);
QQE_MA_ATR_RSI = EMA(QQE_ATR_RSI, 2*QQE_Periods-1);
QQE_DAR = EMA(QQE_MA_ATR_RSI, 2*QQE_Periods-1)*4.236;
QQE_DAR_Fast = EMA(QQE_MA_ATR_RSI, 2*QQE_Periods-1)*2.618;
//SISTEMA;
//STOP = Param ("Stop Loss", 400, 10, 500, 10);
//Profit = Param (" Profit target", 400, 10, 500, 10);
Stop = 15;
Profit = 15;
Buy = Cross (x, 0) AND QQE_RSI_MA> 50 AND QQE_RSI_MA > Ref (QQE_RSI_MA, -1 );
BuyPrice =Min ( Ref (C, -1), Open);
Sell = 0;
Short = Cross ( 0, x) AND QQE_RSI_MA< 50 AND QQE_RSI_MA < Ref (QQE_RSI_MA, -1 );
ShortPrice = Max (Ref (C, -1), Open);
Cover = 0;
ApplyStop ( stopTypeProfit, stopModePoint, profit, True);
ApplyStop ( stopTypeLoss, stopModePoint, stop, True);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorBlue, 0,Low,-25);
//PlotShapes(IIf(Sell, shapeHollowDownArrow, shapeNone),colorRed, 0,High,-15);
//PlotShapes(IIf(Cover, shapeHollowUpArrow, shapeNone),colorGreen, 0,Low,-25);
//PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorGold, 0,High,-25);
PlotShapes ( IIf (Buy, shapeUpArrow, shapeNone), colorGreen, 0, L, -15);
PlotShapes ( IIf (Buy, shapeHollowCircle, shapeNone), colorGreen, 0, BuyPrice, 0);
PlotShapes ( IIf (Sell, shapeDownArrow, shapeNone), colorRed, 0, H, -15);
PlotShapes ( IIf (Sell, shapeHollowCircle, shapeNone), colorRed, 0, SellPrice, 0);
PlotShapes ( IIf (Short, shapeDownArrow, shapeNone), colorBrown, 0, H, -15);
PlotShapes ( IIf (Short, shapeHollowCircle, shapeNone), colorBrown, 0, ShortPrice, 0);
PlotShapes ( IIf (Cover, shapeUpArrow, shapeNone), colorDarkGreen, 0, L, -15);
PlotShapes ( IIf (Cover, shapeHollowCircle, shapeNone), colorDarkGreen, 0, CoverPrice, 0);
If these are fulfilled the conditions of entry, you enter at the close of the candle or the opening of the next candle.
Both the stop-loss benefits as the output is a fixed target of 15 ticks.
If being in a position, the system gives a new signal, if this is for the entry, it builds a new contract, if it is contrary to it is out of position, but not reversed.
The system should operate in three time groups, 9-12, 15:30-18, 19:30-21 in local time.
I wish I could change the number of contracts and of course I wish I could analyze the results of the system with Amibroker.
Also I would like to note in the chart points out.
regards,
I want to develop a simple program, but I have enough programming knowledge. Someone can help me?.
I wrote this code by copying from other systems,
_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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
SetChartBkColor(ParamColor("Outer panel color ",colorWhite)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel color upper half", colorWhite),ParamColor("Inner panel color lower half",
colorWhite)); //color of inner panel
_SECTION_BEGIN("CCI");
periods = Param( "Periods", 14, 2, 200, 1 );
x= CCI( periods );
_SECTION_BEGIN("QQE");
// QQE (Quantative Qualitative Estimation)
QQE_Periods = Param("Period", 14, 3, 30, 1 );
QQE_SF = Param("Smoothing factor", 5, 1, 30, 1 );
QQE_RSI_MA = EMA(RSI(QQE_Periods),QQE_SF);
QQE_ATR_RSI = abs(Ref(QQE_RSI_MA,-1)-QQE_RSI_MA);
QQE_MA_ATR_RSI = EMA(QQE_ATR_RSI, 2*QQE_Periods-1);
QQE_DAR = EMA(QQE_MA_ATR_RSI, 2*QQE_Periods-1)*4.236;
QQE_DAR_Fast = EMA(QQE_MA_ATR_RSI, 2*QQE_Periods-1)*2.618;
//SISTEMA;
//STOP = Param ("Stop Loss", 400, 10, 500, 10);
//Profit = Param (" Profit target", 400, 10, 500, 10);
Stop = 15;
Profit = 15;
Buy = Cross (x, 0) AND QQE_RSI_MA> 50 AND QQE_RSI_MA > Ref (QQE_RSI_MA, -1 );
BuyPrice =Min ( Ref (C, -1), Open);
Sell = 0;
Short = Cross ( 0, x) AND QQE_RSI_MA< 50 AND QQE_RSI_MA < Ref (QQE_RSI_MA, -1 );
ShortPrice = Max (Ref (C, -1), Open);
Cover = 0;
ApplyStop ( stopTypeProfit, stopModePoint, profit, True);
ApplyStop ( stopTypeLoss, stopModePoint, stop, True);
//PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorBlue, 0,Low,-25);
//PlotShapes(IIf(Sell, shapeHollowDownArrow, shapeNone),colorRed, 0,High,-15);
//PlotShapes(IIf(Cover, shapeHollowUpArrow, shapeNone),colorGreen, 0,Low,-25);
//PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorGold, 0,High,-25);
PlotShapes ( IIf (Buy, shapeUpArrow, shapeNone), colorGreen, 0, L, -15);
PlotShapes ( IIf (Buy, shapeHollowCircle, shapeNone), colorGreen, 0, BuyPrice, 0);
PlotShapes ( IIf (Sell, shapeDownArrow, shapeNone), colorRed, 0, H, -15);
PlotShapes ( IIf (Sell, shapeHollowCircle, shapeNone), colorRed, 0, SellPrice, 0);
PlotShapes ( IIf (Short, shapeDownArrow, shapeNone), colorBrown, 0, H, -15);
PlotShapes ( IIf (Short, shapeHollowCircle, shapeNone), colorBrown, 0, ShortPrice, 0);
PlotShapes ( IIf (Cover, shapeUpArrow, shapeNone), colorDarkGreen, 0, L, -15);
PlotShapes ( IIf (Cover, shapeHollowCircle, shapeNone), colorDarkGreen, 0, CoverPrice, 0);
If these are fulfilled the conditions of entry, you enter at the close of the candle or the opening of the next candle.
Both the stop-loss benefits as the output is a fixed target of 15 ticks.
If being in a position, the system gives a new signal, if this is for the entry, it builds a new contract, if it is contrary to it is out of position, but not reversed.
The system should operate in three time groups, 9-12, 15:30-18, 19:30-21 in local time.
I wish I could change the number of contracts and of course I wish I could analyze the results of the system with Amibroker.
Also I would like to note in the chart points out.
regards,