MaxParticipant
Average
Qui di seguito una domanda inviata a ProRealTime :
Buongiorno, vi invio un codice esistente da tradurre in Prorealtime, sarebbe uguale a quello che ho inviato 5 minuti fa, ma non lo avevo inserito nello spazio opzionale.
Ringrazio e invio cordiali saluti.
//Easy language (tradestation) / Power language (multi chart)
Basic code to paly around whit :-)
// Dax, 5 min time frame, default settings, exchenge time
Imput: RangeMultiplayer (0.95),
BegTime (0900),
Endtime (0955),
CloseTime (2155),
SkipeDay(Friday),
MyContracts(1);
Variables:
MinSetup (0), MaxSetup (0),
Sl Long(0), Sl Shot(0),
Daily_Factor (False);
If Date <> Date[1] then begin
Max setup = 0;
Min setup = 0;
Daily_ factor = absvalue (opend(1)-closed(1))<0.75*(highd(1)-Lowd(1));
End;
If daily_factor and time >= BegTime and time <= EndTime and Dayofweek (date) <> SkipDay and EntriesToday (Date) = 0 then begin
If maxsetup = 0 then begin
// do once @ BegTime
maxSutep = HigtD(0) + RangeMultipler * (HigtD(0) - LowD(0));
slLong = HighD(0);
end;
Buy (“Lex”) MyContracts contracts Next Bar at maxSetup stop;
If minSetup = 0 then begin
// do once @ BegTime
minSutep = LowD(0) - RangeMultipler * (HigtD(0) - LowD(0));
slShort = LowD(0);
end;
Sellshort (“SEx”) MyContracts contracts Next Bar at minSetup stop;
end;
Sell (“LXx”) from entry(“LEx”) Next Bar at slLong stop;
BuyToCover(“SXx”) from entry (“SEx”) Next Bar at slShort stop;
If Time >= CloseTime then begin
Sell(“TimeLXx”) from entry (“LEx”) Next Bar Market;
BuyToCover (“TimeSXx”) from entry (“SEx”) Next Bar at market;
End;
Setstopcontract;
SetStopLoss (1000);
SetExitOnClose;
E un esempio di risposta :
DefParam CumulateOrders = False
Once rangeMultiplier = 0.95
Once start = 90000
Once end = 95500
Once closeTime = 215500
Once skipDay = 5
Once dailyFactor = Abs((DOpen(1)-DClose(1))<(0.75*(DHigh(1)-DLow(1))))
If IntradayBarIndex<IntradayBarIndex[1] then
dailyFactor = Abs((DOpen(1)-DClose(1))<(0.75*(DHigh(1)-DLow(1))))
Endif
If dailyFactor and OpenTime >= start and OpenTime <= end and OpenDayOfWeek <> skipDay then
maxStep = DHigh(0)[1] + (rangeMultiplier * (DHigh(0)[1] - DLow(0)[1]))
Buy 1 Share At maxStep Stop
If LongOnMarket then
Sell At DHigh(0)[1] Limit
Endif
minStep = DLow(0)[1] - (rangeMultiplier * (DHigh(0)[1] - DLow(0)[1]))
Sellshort 1 Share At minStep Stop
If ShortOnMarket then
Exitshort At DLow(0)[1] Limit
Endif
Elsif OpenTime >= closeTime then
If LongOnMarket then
Sell At Market
Endif
If ShortOnMarket then
Exitshort At Market
Endif
Endif
Set Stop pLoss 1000
ALEModerator
Master
Ciao MAx,
sei in grado di tradurre da Prorealtime a Easylanguage?
Grazie
Ale