moving average trading system MetaStock conversion request

Forums ProRealTime English forum ProOrder support moving average trading system MetaStock conversion request

Viewing 4 posts - 1 through 4 (of 4 total)
  • #95144

    Can anyone convert this metastock moving average trading system code into proreal time

     

    _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(“AP 13ma sys”);
    Buy = Ref(C,-1) > Ref(MA(C,13),-1) AND Ref(C,-1)<Ref(C,-2) AND Cross(H, O+((Ref(h,-1)-Ref(l,-1))*.55));
    Sell = Ref(C,-1) < Ref(MA(C,13),-1) AND Ref(C,-1)>Ref(C,-2) AND Cross( O-((Ref(h,-1)-Ref(l,-1))*.55),l);

    if( ParamToggle(“Exrem “, “No|Yes”, 0))
    {
    Buy = ExRem(Buy,Sell);
    Sell = ExRem(Sell,Buy);
    }

    if( ParamToggle(“Plot sig “, “No|Yes”, 1))
    {
    PlotShapes(Buy*shapeUpArrow, colorGreen, 0, Low, -10);
    PlotShapes(Sell*shapeDownArrow, colorRed, 0, High, -10);
    }

    stat = WriteIf(Buy,”Buy”,WriteIf(Sell,”Sell”,””));
    Filter = Buy OR Sell;

    AddTextColumn(stat, “Signal”, 1, colorblack, colorDefault);

    _SECTION_END();

    #95205

    What do you want exactly about that code? This one plots only signals on the price charts depending of moving average conditions, it doesn’t trade automatically that signals.

    Please next time when asking for a code conversion, use this page and follow the rules: Ask for a free code conversion

    #95208

    I want to trade and  backtest through  IG cfd pro real time  platform

    #95232

    I think that this code is a correct conversion of the strategy:

     

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login