NexusFi: Find Your Edge


Home Menu

 





ORB Thinkorswim code for TradeStation 10


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one lrc11239 with 19 posts (0 thanks)
    2. looks_two numberjuani with 17 posts (2 thanks)
    3. looks_3 ilalovely with 7 posts (1 thanks)
    4. looks_4 kevinkdog with 5 posts (0 thanks)
    1. trending_up 11,381 views
    2. thumb_up 3 thanks given
    3. group 7 followers
    1. forum 53 posts
    2. attach_file 7 attachments




 
Search this Thread

ORB Thinkorswim code for TradeStation 10

  #11 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102

Inputs:
SessionStart(630),
RangeDurationBars(1),
Targets(10);


Variables:
FirstBar(0),
LastBar(0),
Period(0),
BreakoutTop(0),
BreakoutBottom(0);


if time = SessionStart then begin
LastBar = BarNumber[1];
Period = LastBar - FirstBar;
FirstBar = CurrentBar;
Print(Period);
end;

If BarNumber = FirstBar + (RangeDurationBars -1) then begin
BreakoutTop = Highest(H, CurrentBar - FirstBar + 1);
Breakoutbottom = Lowest(L, CurrentBar - FirstBar + 1);
end;


Plot1(BreakoutTop, "OpeningRangeTop");
Plot2(Breakoutbottom, "OpeningRangeBottom");
Plot3(BreakoutTop + Targets, “TargetL”);
Plot4(BreakoutBottom -Targets, “TargetS”);


If CurrentBar = FirstBar + Period or CurrentBar = (FirstBar + (RangeDurationBars -1 )) or FirstBar = CurrentBar then begin
SetPlotColor(1, Transparent);
SetPlotColor(2, Transparent);
SetPlotColor(3, Transparent);
SetPlotColor(4, Transparent);

end;






Sent using the NexusFi mobile app

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Deepmoney LLM
Elite Quantitative GenAI/LLM
 

  #12 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102

Let me know if it works I’m in a plane and don’t have access to TS So I’m not sure it’ll verify but it should


Sent using the NexusFi mobile app

Reply With Quote
  #13 (permalink)
lrc11239
Brooklyn NY USA
 
Posts: 27 since Jul 2019
Thanks Given: 2
Thanks Received: 0



numberjuani View Post
Let me know if it works I’m in a plane and don’t have access to TS So I’m not sure it’ll verify but it should


Sent using the NexusFi mobile app



Ok thanks. I’ll check it later tonight. Enjoy your weekend!!!


Sent using the NexusFi mobile app

Reply With Quote
  #14 (permalink)
lrc11239
Brooklyn NY USA
 
Posts: 27 since Jul 2019
Thanks Given: 2
Thanks Received: 0

it came back with these 2 errors:

Plot name expected Here - Line 30 Error (#30194)
This plot has never been assigned a value - Line 31 Error (#30296)




Thanks....

Reply With Quote
  #15 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102


lrc11239 View Post
it came back with these 2 errors:



Plot name expected Here - Line 30 Error (#30194)

This plot has never been assigned a value - Line 31 Error (#30296)









Thanks....



Ok I’ll fix it when I’m back I’ll post it here


Sent using the NexusFi mobile app

Reply With Quote
  #16 (permalink)
lrc11239
Brooklyn NY USA
 
Posts: 27 since Jul 2019
Thanks Given: 2
Thanks Received: 0

Thanks as always!


Sent using the NexusFi mobile app

Reply With Quote
  #17 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102


lrc11239 View Post
Thanks as always!


Sent using the nexusfi.com mobile app

Inputs:
SessionStart(630),
RangeDurationBars(1),
Targets(10);


Variables:
FirstBar(0),
LastBar(0),
Period(0),
BreakoutTop(0),
BreakoutBottom(0);


if time = SessionStart then begin
LastBar = BarNumber[1];
Period = LastBar - FirstBar;
FirstBar = CurrentBar;
Print(Period);
end;

If BarNumber = FirstBar + (RangeDurationBars -1) then begin
BreakoutTop = Highest(H, CurrentBar - FirstBar + 1);
Breakoutbottom = Lowest(L, CurrentBar - FirstBar + 1);
end;


Plot1(BreakoutTop, "OpeningRangeTop");
Plot2(Breakoutbottom, "OpeningRangeBottom");
Plot3(BreakoutTop + Targets, "LE_Target");
Plot4(Breakoutbottom - Targets, "SE_Target");

If CurrentBar = FirstBar + Period or CurrentBar = (FirstBar + (RangeDurationBars -1 )) or FirstBar = CurrentBar then begin
SetPlotColor(1, Transparent);
SetPlotColor(2, Transparent);
SetPlotColor(3, Transparent);
SetPlotColor(4, Transparent);
end;

Reply With Quote
  #18 (permalink)
lrc11239
Brooklyn NY USA
 
Posts: 27 since Jul 2019
Thanks Given: 2
Thanks Received: 0

Thank you!!! They work perfectly!!!

Reply With Quote
  #19 (permalink)
lrc11239
Brooklyn NY USA
 
Posts: 27 since Jul 2019
Thanks Given: 2
Thanks Received: 0


lrc11239 View Post
Thank you!!! They work perfectly!!!



Hello.
One more request for you. After the opening range is calculated can the lines be extended forward about 25 bars or an hour instead of as the bars are formed.
I really appreciate all your help.


Sent using the NexusFi mobile app

Reply With Quote
  #20 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102


Ok so let me get this straight you just want the plot to cut out after x number or bars basically?


Sent using the NexusFi mobile app

Reply With Quote





Last Updated on November 6, 2023


© 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