Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Can anyone help me make the RC Beginner strategy work in MultiCharts?
I am using MultiCharts version 6 and I have imported a strategy called “RC Beginner” from TradeStation into MC (see attached file). My problem is that it is not working in MC, although the PowerLanguage editor has compiled it successfully. It works fine in TS but not in MC. I have other signals that I use in MC that are working just fine. So my software installation is visibly not the issue. Can someone help me make it work in MC? Here's the code:
Inputs:
PriceES(Close of Data1),
PriceNDQ(Close of Data2);
Vars: StopLoss(12), Stop_Width(0), Stop_Price(0);
Vars: StartTimeMins(0), EndTimeMins(0), LastTradeMins(0), Tmins(0);
if CurrentBar=1 then
begin
StartTimeMins = TimeToMinutes(Sess1StartTime)+40; //10:10
LastTradeMins = TimeToMinutes(Sess1EndTime)-25; //15:50
EndTimeMins = TimeToMinutes(Sess1EndTime)-15; //16:00
end;
Tmins = TimeToMinutes (Time);
Vars: ESYDC(0), NDQYDC(0), Started(FALSE);
Vars: ESLevel(0), NDQLevel(0);
if Date<>Date[1] then
begin
ESYDC = PriceES[1];
NDQYDC = PriceNDQ[1];
Started = TRUE;
end;
if Started then
begin
ESLevel = Close-ESYDC;
NDQLevel = PriceNDQ-NDQYDC;
end;
Vars: Priority(false), NDQ(0), NoTrade(false);
Vars: Trade1(false), Trade3(false), Trade4(false), Trade5(false);
Vars: Trade6(false), Trade8(false), Trade9(false), Trade10(false);
if Date<>Date[1] then
begin
Priority = false;
NoTrade = false;
Trade1 = false;
Trade3 = false;
Trade4 = false;
Trade5 = false;
Trade6 = false;
Trade8 = false;
Trade9 = false;
Trade10 = false;
end;
if Tmins = StartTimeMins then
begin
{condition 1}
if ESLevel >= 0 and ESLevel < 10 and NDQLevel >= 0 and NDQLevel
< 10 and NDQLevel >= ESLevel then Trade1 = true
{condition 2}
else if ESLevel >= 0 and ESLevel < 10 and NDQLevel >= 0 and
NDQLevel < 10 and ESLevel > NDQLevel then NoTrade = true
{condition 3}
else if ESLevel < 0 and ESLevel > -10 and NDQLevel < 0 and
NDQLevel > -10 and NDQLevel <= ESLevel then Trade3 = true
{condition 4}
else if ESLevel < 0 and ESLevel > -10 and NDQLevel < 0 and
NDQLevel > -10 and ESLevel < NDQLevel then
begin
Sell Short("Short 4")this bar on close;
Priority = true;
Stop_Width = StopLoss;
end
{condition 5}
else if ESLevel >= 0 and ESLevel < 10 and NDQLevel < 0 and
NDQLevel > -10 then Trade5 = true
{condition 6}
else if ESLevel < 0 and ESLevel > -10 and NDQLevel >= 0 and
NDQLevel < 10 then Trade6 = true
{condition 7}
else if ESLevel < 0 and ESLevel > -10 and NDQLevel <= -10 then
NoTrade = true
{condition 8}
else if ESLevel >= 0 and ESLevel < 10 and NDQLevel >= 10 then
begin
NDQ = NDQLevel;
Trade8 = true;
End
{condition 9}
else if ESLevel <= -10 and NDQLevel <= -10 then
begin
NDQ = NDQLevel;
Trade9 = true;
End
{condition 10}
else if ESLevel >= 10 and NDQLevel >= 10 then
begin
NDQ = NDQLevel;
Trade10 = true;
end;
end;
if Tmins >= StartTimeMins and Tmins <= LastTradeMins and
Priority = false then
begin
{condition 1}
if NDQLevel <= -13 and Trade1 then
begin
Sell Short("Short 1")this bar on close;
Trade1 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 2 = No Trade}
{condition 3}
if NDQLevel <= -13 and Trade3 then
begin
Sell Short("Short 3")this bar on close;
Trade3 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 5}
if ESLevel >= 2 and NDQLevel >= 13 and Trade5 then
begin
Buy("Long 5")this bar on close;
Trade5 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 6}
if ESLevel <= -2 and NDQLevel <= -13 and Trade6 then
begin
Sell Short("Short 6")this bar on close;
Trade6 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 7 = No Trade}
{condition 8}
if NDQLevel-NDQ >= 10 and Trade8 then
begin
Buy("Long 8")this bar on close;
Trade8 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 9}
if NDQ-NDQLevel >= 10 and Trade9 then
begin
Sell Short("Short 9")this bar on close;
Trade9 = false;
Priority = true;
Stop_Width = StopLoss;
end;
{condition 10}
if NDQLevel-NDQ >= 10 and Trade10 then
begin
Buy("Long 10")this bar on close;
Trade10 = false;
Priority = true;
Stop_Width = StopLoss;
end;
end;
if MarketPosition = 1 then
begin
Stop_Price = EntryPrice - Stop_Width;
Sell ("L-Exit") next bar Stop_Price Stop;
end;
if MarketPosition = -1 then
begin
Stop_Price = EntryPrice + Stop_Width; buy to cover ("S-Exit") next bar Stop_Price
Stop;
end;
if Tmins >= EndTimeMins then
begin
Sell("Long Close") this bar on close;
Buy to Cover("Short Close") this bar on close;
end;
Thanks in advance,
Michael
Can you help answer these questions from other members on NexusFi?
What does "not working" mean? Be more specific, include exactly what steps you are taking when adding it to your chart. Have you also viewed the performance report and does it show any trades?
By not working I mean, it does not display the same number of trades in MC than in TS (see attached pics). You will notice on the pics that for the same period you not only get more signals in TS but they are also "real" trades as opposed to MC where you see only 3 trades for the whole report all ending at $0 profit/loss. Strange...
I just tried that and nothing different happened. Have you tried yourself the .pla file that I attached to this thread? Does it work on your Multicharts installation?