NexusFi: Find Your Edge


Home Menu

 





need help with easy language OR breakout code:)


Discussion in Traders Hideout

Updated
    1. trending_up 1,204 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

need help with easy language OR breakout code:)

  #1 (permalink)
 wolf777trader 
Amsterdam, Netherlands
 
Experience: Intermediate
Posts: 13 since May 2022
Thanks Given: 2
Thanks Received: 0

Hi guys,

I am new to this forum and I would like to get your support on the following strategy that I would like to adjust to trade the OR breakout for futures. I found this code on another post and I would like to make following modifications:
- add opening and closing time (for me 15.30 and 22.00 since I am based in Europe)currently this code takes the first bar of the day on the chart. I could use the index tickers but I usually trade on futures index
- add stop loss @high/low of opening range when going short/long
- take profit end of the day at 22:01 (CET time)

thanks a lot for your help

here is the code:

Inputs: iRangeLengthMin(30),

iBrakePoints(1),

iEntryTimeLimit(-90),

iContracts(1),

iProfitTarget(500),

Price(Close),

Length(12),
ShowText (true);



Var: OpenRangeTime(CalcTime(SessionStartTime(0,1), iRangeLengthMin)),

EntryTimeLimit(CalcTime(SessionEndTime(0,1), iEntryTimeLimit)),

RangeH(0),RangeL(0), // H&L of range

TimeH(0), TimeL(0), // time of H&L

RangeHtime(0), RangeLtime(0),

vDollarStop(500),

FirstTrade(true),

CustomCond(true),

Cond4trade(true),

vVolumeLenght(7),

ExpAvg(0),

firstcheck(true),

MaxP(0),

DateInFromTo(false);



// New day settings

if Date<>Date[1] then begin

//DateInFromTo= (Date>=iFromYYYMMDD and Date<=iToYYYMMDD);

FirstTrade=true;

RangeH=H; RangeL=L; // first bars High Low are Ranges h&l

TimeH=Time; TimeL=Time;

end;



// Range settings

If L<LowD(0)[1] then TimeL=Time; {if new H or L, remember the time of H or L}

If H>HighD(0)[1] then TimeH=Time;



If Time=OpenRangeTime then begin // if openning range is finished

RangeH=HighD(0);

RangeL=LowD(0);

RangeHtime=TimeH;

RangeLtime=TimeL;

end; // remember Range parameters



// ***************** Trade ******************

CustomCond= true;

Cond4trade = CustomCond and time>OpenRangeTime and time<EntryTimeLimit ; //and DateInFromTo



If Cond4Trade then begin

If FirstTrade and Close>=RangeH then

begin

Buy("BrOR_L1") iContracts contracts Next bar at open;

FirstTrade=false;

end;

If FirstTrade and Close<=RangeL then

begin

sellshort("RrOR_Sh1") iContracts contracts next bar at open;

FirstTrade=false;

end;

end;

SetStopContract;

SetStopLoss(100);

SetProfitTarget(100);



// ******************** Plots and Text ********************

Vars: Decimals(Log(PriceScale)/ Log(10)),

PLot_hi(0),Plot_lo(0),

Low_line(-1),OR_Bar(-1),Hi_Line(-1),

Hi_text(-1),Lo_text(-1);



if time = OpenRangeTime then begin

Plot_hi = HighD(0);

Plot_lo = LowD(0);



{Draw Lines}

Hi_line = TL_new(date,time,Plot_hi,date,SessionEndTime(0,1),Plot_hi);

Tl_setstyle(Hi_line,tool_dashed2);

Tl_setcolor(Hi_line, yellow);

Low_line = TL_new(date,time,Plot_lo,Date,SessionEndTime(0,1),Plot_lo);

Tl_setstyle(Low_line,tool_dashed2);

Tl_setcolor(Low_line,yellow );

OR_bar = TL_new(date,time,Plot_hi,date,time,plot_lo);

TL_setcolor(OR_bar,lightgray);

{Text}

if ShowText then begin

Hi_text = Text_new(Date,SessionStartTime(0,1) ,Plot_hi ,numtostr(Plot_hi,decimals));

Lo_text = Text_new(Date,SessionStartTime(0,1),Plot_lo ,numtostr(Plot_lo,decimals));

end;

end;

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
43 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #2 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22


wolf777trader View Post
Hi guys,

I am new to this forum and I would like to get your support on the following strategy that I would like to adjust to trade the OR breakout for futures. I found this code on another post and I would like to make following modifications:
- add opening and closing time (for me 15.30 and 22.00 since I am based in Europe)currently this code takes the first bar of the day on the chart. I could use the index tickers but I usually trade on futures index
- add stop loss @high/low of opening range when going short/long
- take profit end of the day at 22:01 (CET time)

thanks a lot for your help

here is the code:

Inputs: iRangeLengthMin(30),

iBrakePoints(1),

iEntryTimeLimit(-90),

iContracts(1),

iProfitTarget(500),

Price(Close),

Length(12),
ShowText (true);



Var: OpenRangeTime(CalcTime(SessionStartTime(0,1), iRangeLengthMin)),

EntryTimeLimit(CalcTime(SessionEndTime(0,1), iEntryTimeLimit)),

RangeH(0),RangeL(0), // H&L of range

TimeH(0), TimeL(0), // time of H&L

RangeHtime(0), RangeLtime(0),

vDollarStop(500),

FirstTrade(true),

CustomCond(true),

Cond4trade(true),

vVolumeLenght(7),

ExpAvg(0),

firstcheck(true),

MaxP(0),

DateInFromTo(false);



// New day settings

if Date<>Date[1] then begin

//DateInFromTo= (Date>=iFromYYYMMDD and Date<=iToYYYMMDD);

FirstTrade=true;

RangeH=H; RangeL=L; // first bars High Low are Ranges h&l

TimeH=Time; TimeL=Time;

end;



// Range settings

If L<LowD(0)[1] then TimeL=Time; {if new H or L, remember the time of H or L}

If H>HighD(0)[1] then TimeH=Time;



If Time=OpenRangeTime then begin // if openning range is finished

RangeH=HighD(0);

RangeL=LowD(0);

RangeHtime=TimeH;

RangeLtime=TimeL;

end; // remember Range parameters



// ***************** Trade ******************

CustomCond= true;

Cond4trade = CustomCond and time>OpenRangeTime and time<EntryTimeLimit ; //and DateInFromTo



If Cond4Trade then begin

If FirstTrade and Close>=RangeH then

begin

Buy("BrOR_L1") iContracts contracts Next bar at open;

FirstTrade=false;

end;

If FirstTrade and Close<=RangeL then

begin

sellshort("RrOR_Sh1") iContracts contracts next bar at open;

FirstTrade=false;

end;

end;

SetStopContract;

SetStopLoss(100);

SetProfitTarget(100);



// ******************** Plots and Text ********************

Vars: Decimals(Log(PriceScale)/ Log(10)),

PLot_hi(0),Plot_lo(0),

Low_line(-1),OR_Bar(-1),Hi_Line(-1),

Hi_text(-1),Lo_text(-1);



if time = OpenRangeTime then begin

Plot_hi = HighD(0);

Plot_lo = LowD(0);



{Draw Lines}

Hi_line = TL_new(date,time,Plot_hi,date,SessionEndTime(0,1),Plot_hi);

Tl_setstyle(Hi_line,tool_dashed2);

Tl_setcolor(Hi_line, yellow);

Low_line = TL_new(date,time,Plot_lo,Date,SessionEndTime(0,1),Plot_lo);

Tl_setstyle(Low_line,tool_dashed2);

Tl_setcolor(Low_line,yellow );

OR_bar = TL_new(date,time,Plot_hi,date,time,plot_lo);

TL_setcolor(OR_bar,lightgray);

{Text}

if ShowText then begin

Hi_text = Text_new(Date,SessionStartTime(0,1) ,Plot_hi ,numtostr(Plot_hi,decimals));

Lo_text = Text_new(Date,SessionStartTime(0,1),Plot_lo ,numtostr(Plot_lo,decimals));

end;

end;

What time-frame do you want to use for the entries?

Reply With Quote
  #3 (permalink)
 wolf777trader 
Amsterdam, Netherlands
 
Experience: Intermediate
Posts: 13 since May 2022
Thanks Given: 2
Thanks Received: 0


Hi Soacm,

5 min bars

Started this thread Reply With Quote
  #4 (permalink)
 wolf777trader 
Amsterdam, Netherlands
 
Experience: Intermediate
Posts: 13 since May 2022
Thanks Given: 2
Thanks Received: 0

Hi Soacm,

I managed to make some adjustments to the code, but it doesn't give any result. can you maybe help here?

Inputs:
startTime ( 7 ),
endTime ( 9 ),
startTradeTime ( 11 ),
use_yest ( 5 ),
use_stop_method ( 0 ),
stoploss ( 16 ),
target1 ( 32 ),
target2 ( 16 ),
target3 ( 72 ),
datramt ( 1 ),
minrange ( 100 ),
mind_gap ( 1 ),
mind_yesthl ( 1 );

variables:
sessHi (0),
sessLo (0),
sessOp (0),
yHi ( 0 ),
yLo ( 0 ),
yOp ( 0 ),
yCl ( 0 ),
tradestoday ( 0 ),
datr ( 0 );

if date <> date[1] then begin
yHi = sessHi;
yLo = sessLo;
yOp = sessOp;
yCl = Close[1];
sessOp = Open;
sessLo = Low;
sessHi = High;
datr = XAverage(DailyATR(1), 7);
tradestoday = 0;
end;

if time > startTime*100 and time <= endTime*100 then begin
if High > SessHi then SessHi = High;
if Low < SessLo then SessLo = Low;
end;

if time > startTradeTime * 100 and time < 1320 and AbsValue(sessHi - sessLo) > (minrange * MinMove / PriceScale) and MarketPosition = 0 and exitdate(1) <> date then begin


SetStopContract;

SetStopLoss( stoploss * BigPointValue );

// entries

condition1 = false;
condition2 = false;

if mind_yesthl = 1 and Close + (target1 * MinMove / PriceScale) > yHi then condition1 = true;
if mind_yesthl = 1 and Close - (target1 * MinMove / PriceScale) < yLo then condition2 = true;

if mind_yesthl = 0 then begin condition1 = true; condition2 = true; end;

condition3 = false;
condition4 = false;

if mind_gap = 1 and sessOp > yCl and sessLo < yCl then condition3 = true;
if mind_gap = 1 and sessOp < yCl and sessHi > yCl then condition4 = true;

if mind_gap = 0 then begin condition3 = true; condition4 = true; end;

if use_yest = 0 and condition1 and condition3 and Close > SessHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 0 and condition2 and condition4 and Close < SessLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 1 and condition1 and condition3 and Close > yHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 1 and condition2 and condition4 and Close < yLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 2 and condition1 and condition3 and Close > yHi and Close > SessHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 2 and condition2 and condition4 and Close < yLo and Close < SessLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 3 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yHi) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 3 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yLo) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 4 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yOp) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 4 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yOp) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 5 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yCl) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 5 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yCl) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

end;

if MarketPosition = 1 then begin
if CurrentContracts = 3 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + (target1 * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2) * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 2 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2) * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 1 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + (target1 * MinMove / PriceScale) Limit;
end;
end;

if MarketPosition = -1 then begin
if CurrentContracts = 3 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - (target1 * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2) * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 2 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2) * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 1 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - (target1 * MinMove / PriceScale) Limit;
end;
end;


if time > 1320 and MarketPosition = 1 then Sell All Contracts Next Bar At Market;
if time > 1320 and MarketPosition = -1 then Buytocover All Contracts Next Bar At Market;

if use_stop_method = 1 and MarketPosition = 1 then Sell All Contracts Next Bar At MinList(Low[BarsSinceEntry], Low[BarsSinceEntry+1], Low[BarsSinceEntry+2]) Stop;
if use_stop_method = 1 and MarketPosition = -1 then Buytocover All Contracts Next Bar At MaxList(High[BarsSinceEntry], High[BarsSinceEntry+1], High[BarsSinceEntry+2]) Stop;

if use_stop_method = 2 and MarketPosition = 1 and Lowest(Low, 3)[BarsSinceEntry] > XAverage(Close, 20) and Close < XAverage(Close, 20) then Sell All Contracts Next Bar At Market;
if use_stop_method = 2 and MarketPosition = -1 and Highest(High, 3)[BarsSinceEntry] < XAverage(Close, 20) and Close > XAverage(Close, 20) then Buytocover All Contracts Next Bar At Market;

// check for dt/db
if MarketPosition = 1 and Highest(High, 100)[1] = High then Sell All Contracts Next Bar At Market;
if MarketPosition = -1 and Lowest(Low, 100)[1] = Low then Buytocover All Contracts Next Bar At Market;

Started this thread Reply With Quote
  #5 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22


wolf777trader View Post
Hi Soacm,

I managed to make some adjustments to the code, but it doesn't give any result. can you maybe help here?

Inputs:
startTime ( 7 ),
endTime ( 9 ),
startTradeTime ( 11 ),
use_yest ( 5 ),
use_stop_method ( 0 ),
stoploss ( 16 ),
target1 ( 32 ),
target2 ( 16 ),
target3 ( 72 ),
datramt ( 1 ),
minrange ( 100 ),
mind_gap ( 1 ),
mind_yesthl ( 1 );

variables:
sessHi (0),
sessLo (0),
sessOp (0),
yHi ( 0 ),
yLo ( 0 ),
yOp ( 0 ),
yCl ( 0 ),
tradestoday ( 0 ),
datr ( 0 );

if date <> date[1] then begin
yHi = sessHi;
yLo = sessLo;
yOp = sessOp;
yCl = Close[1];
sessOp = Open;
sessLo = Low;
sessHi = High;
datr = XAverage(DailyATR(1), 7);
tradestoday = 0;
end;

if time > startTime*100 and time <= endTime*100 then begin
if High > SessHi then SessHi = High;
if Low < SessLo then SessLo = Low;
end;

if time > startTradeTime * 100 and time < 1320 and AbsValue(sessHi - sessLo) > (minrange * MinMove / PriceScale) and MarketPosition = 0 and exitdate(1) <> date then begin


SetStopContract;

SetStopLoss( stoploss * BigPointValue );

// entries

condition1 = false;
condition2 = false;

if mind_yesthl = 1 and Close + (target1 * MinMove / PriceScale) > yHi then condition1 = true;
if mind_yesthl = 1 and Close - (target1 * MinMove / PriceScale) < yLo then condition2 = true;

if mind_yesthl = 0 then begin condition1 = true; condition2 = true; end;

condition3 = false;
condition4 = false;

if mind_gap = 1 and sessOp > yCl and sessLo < yCl then condition3 = true;
if mind_gap = 1 and sessOp < yCl and sessHi > yCl then condition4 = true;

if mind_gap = 0 then begin condition3 = true; condition4 = true; end;

if use_yest = 0 and condition1 and condition3 and Close > SessHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 0 and condition2 and condition4 and Close < SessLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 1 and condition1 and condition3 and Close > yHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 1 and condition2 and condition4 and Close < yLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 2 and condition1 and condition3 and Close > yHi and Close > SessHi then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 2 and condition2 and condition4 and Close < yLo and Close < SessLo then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 3 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yHi) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 3 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yLo) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 4 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yOp) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 4 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yOp) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

if use_yest = 5 and condition1 and condition3 and Close > SessHi and (Close > yHi or sessLo > yCl) then begin
Buy 3 Contracts Next Bar At Market;
tradestoday = 1;
end;
if use_yest = 5 and condition2 and condition4 and Close < SessLo and (Close < yLo or sessHi < yCl) then begin
Sellshort 3 Contracts Next Bar At Market;
tradestoday = 1;
end;

end;

if MarketPosition = 1 then begin
if CurrentContracts = 3 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + (target1 * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2) * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 2 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2) * MinMove / PriceScale) Limit;
Sell 1 Contracts Next Bar At EntryPrice(0) + ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 1 then begin
Sell 1 Contracts Next Bar At EntryPrice(0) + (target1 * MinMove / PriceScale) Limit;
end;
end;

if MarketPosition = -1 then begin
if CurrentContracts = 3 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - (target1 * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2) * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 2 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2) * MinMove / PriceScale) Limit;
Buytocover 1 Contracts Next Bar At EntryPrice(0) - ((target1+target2+target3) * MinMove / PriceScale) Limit;
end;
if CurrentContracts = 1 then begin
Buytocover 1 Contracts Next Bar At EntryPrice(0) - (target1 * MinMove / PriceScale) Limit;
end;
end;


if time > 1320 and MarketPosition = 1 then Sell All Contracts Next Bar At Market;
if time > 1320 and MarketPosition = -1 then Buytocover All Contracts Next Bar At Market;

if use_stop_method = 1 and MarketPosition = 1 then Sell All Contracts Next Bar At MinList(Low[BarsSinceEntry], Low[BarsSinceEntry+1], Low[BarsSinceEntry+2]) Stop;
if use_stop_method = 1 and MarketPosition = -1 then Buytocover All Contracts Next Bar At MaxList(High[BarsSinceEntry], High[BarsSinceEntry+1], High[BarsSinceEntry+2]) Stop;

if use_stop_method = 2 and MarketPosition = 1 and Lowest(Low, 3)[BarsSinceEntry] > XAverage(Close, 20) and Close < XAverage(Close, 20) then Sell All Contracts Next Bar At Market;
if use_stop_method = 2 and MarketPosition = -1 and Highest(High, 3)[BarsSinceEntry] < XAverage(Close, 20) and Close > XAverage(Close, 20) then Buytocover All Contracts Next Bar At Market;

// check for dt/db
if MarketPosition = 1 and Highest(High, 100)[1] = High then Sell All Contracts Next Bar At Market;
if MarketPosition = -1 and Lowest(Low, 100)[1] = Low then Buytocover All Contracts Next Bar At Market;

In my opinion it is way too complex for an ORB strategy, try this one and let me know:
 
Code
// ORB

inputs: MyPerc(0.5), MyStopLoss(0), StartTime(800), EndTime(1800);  // here you can change the hours when you want to trade

vars: MaxSetup(0), MinSetup(0), MyRange(0);

   MyRange = highd(1) - lowd(1);
   MaxSetup = opend(0) + MyRange*MyPerc;
   MinSetup = opend(0) - MyRange*MyPerc;

// Entries

if EntriesToday(date[0]) < 1             and 
Time > StartTime                         and 
Time < EndTime                           then 

begin 
   Buy next bar at MaxSetup on Stop;
   Sellshort next bar at MinSetup on Stop;
end;


// Exit
Setexitonclose;

Reply With Quote





Last Updated on May 21, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts