NexusFi: Find Your Edge


Home Menu

 





Random Walk by Poulos


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one SMCJB with 7 posts (3 thanks)
    2. looks_two Shaban with 4 posts (3 thanks)
    3. looks_3 Mucho20 with 4 posts (1 thanks)
    4. looks_4 kevinkdog with 3 posts (1 thanks)
      Best Posters
    1. looks_one Shaban with 0.8 thanks per post
    2. looks_two SMCJB with 0.4 thanks per post
    3. looks_3 kevinkdog with 0.3 thanks per post
    4. looks_4 Mucho20 with 0.3 thanks per post
    1. trending_up 3,660 views
    2. thumb_up 8 thanks given
    3. group 4 followers
    1. forum 18 posts
    2. attach_file 5 attachments




 
Search this Thread

Random Walk by Poulos

  #11 (permalink)
 Mucho20 
Chesterton, IN /USA
 
Experience: Intermediate
Platform: TradeStation
Trading: 2 Year Treasury Notes
Posts: 5 since Mar 2020
Thanks Given: 2
Thanks Received: 1

Wow, thanks! Especially, a big thank you to SMCJB. I haven't had time to plug this into EasyLanguage (working out of town last weekend). But, I'll definitely give it a go before the end of the week.

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
Are there any eval firms that allow you to sink to your …
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #12 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


Mucho20 View Post
Wow, thanks! Especially, a big thank you to SMCJB. I haven't had time to plug this into EasyLanguage (working out of town last weekend). But, I'll definitely give it a go before the end of the week.

Chesterton IN?

My son and I are visiting there next month - staying at the hotel on the Norfolk Southern tracks. He is a huge train nut.

Follow me on Twitter Reply With Quote
  #13 (permalink)
 Mucho20 
Chesterton, IN /USA
 
Experience: Intermediate
Platform: TradeStation
Trading: 2 Year Treasury Notes
Posts: 5 since Mar 2020
Thanks Given: 2
Thanks Received: 1


I know the place. I've never stayed, but I've heard it's pretty decent. There is an incredible number of restaurants in this small town.

Started this thread Reply With Quote
Thanked by:
  #14 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


Mucho20 View Post
I know the place. I've never stayed, but I've heard it's pretty decent. There is an incredible number of restaurants in this small town.

We will probably be trying some, via delivery. My son want to maximize train watching!!

Follow me on Twitter Reply With Quote
  #15 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


kevinkdog View Post
My son want to maximize train watching!!

I didn't know it was a thing in the States. It is, or at least was when I was a kid, pretty big in the UK. Not only seeing them, but being on trains pulled by them - of course the UK has passenger trains unlike most of the US!

Now you've got me curious, I'm going to see if I can find some old photos of me with trains. My favorite's were the Class 20's called 'Choppers' because of the sound they made when running. They almost always worked in pairs, but were almost exclusively used for freight. Then there were the Class 37, Class 45 or Class 46. All big enthusiast favorites. (Nobody liked the Class 47s, probably cause they made so many of them.) And now we have completely sabotaged the thread!

Reply With Quote
Thanked by:
  #16 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


SMCJB View Post
I didn't know it was a thing in the States. It is, or at least was when I was a kid, pretty big in the UK. Not only seeing them, but being on trains pulled by them - of course the UK has passenger trains unlike most of the US!

Now you've got me curious, I'm going to see if I can find some old photos of me with trains. My favorite's were the Class 20's called 'Choppers' because of the sound they made when running. They almost always worked in pairs, but were almost exclusively used for freight. Then there were the Class 37, Class 45 or Class 46. All big enthusiast favorites. (Nobody liked the Class 47s, probably cause they made so many of them.) And now we have completely sabotaged the thread!

LOL, that is cool. There is a train watching area in Cleveland, and most days there are 5-20 people watching - old guys, young guys, kids, etc.

We are going to watch some kind of steam engine this weekend. I'll ask him if he is familiar with any of the trains you mentioned.

Sorry for the thread hijack!

Follow me on Twitter Reply With Quote
Thanked by:
  #17 (permalink)
 Mucho20 
Chesterton, IN /USA
 
Experience: Intermediate
Platform: TradeStation
Trading: 2 Year Treasury Notes
Posts: 5 since Mar 2020
Thanks Given: 2
Thanks Received: 1

SMCJB:

The code you provided at 10:30 AM works. The one you provided at 2:00 in the afternoon does not. The error message mentioned something about trying to divide by zero. Do you know if the two codes produce the same data?



OK, (this is two hours later), I checked the data (on the first one) with a Random Walk indicator I have in AmeriTrade (Think or Swim). The data is NOT the same. Actually, the data doesn't even appear to be similar.

Started this thread Reply With Quote
  #18 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

As I had written in the post #9, in this Site: https://www.multicharts.com/discussion/viewtopic.php?t=11125
are present these 2 Functions: hhrwi and llrwi, with which I have realized the formula of the Indicator: Random Wal Index (if someone wants to insert some improvements to the formula of the Indicator,...every contribution is appreciated):

--------------------------------------------------------------


Function name: hhrwi



Inputs :len(NumericSimple),beg(numericsimple);

Vars: Counter(0),maxi(0);

Array : RW[100](0);

if len>beg then begin

value1=truerange;

For Counter =beg to len begin

value2=average(value1,counter)*squareroot(counter);

if value2<>0 then begin

value3=(h-L[Counter])/value2;

end else begin

value3=0;

end;

RW[Counter] = value3;

End;



maxi=0;

For Counter=beg to len begin

if RW[Counter] >= maxi then begin

maxi = RW[Counter];

end;

end;

end;

hhrwi=maxi;

-------------------------------------------------------------

Function name: llrwi



Inputs :len(NumericSimple),beg(numericsimple);

Vars: Counter(0),maxi(0);

Array :RW[100](0);

if len>beg then begin

value1=truerange;

For Counter =beg to len begin

value2=average(value1,counter)*squareroot(counter);

if value2<>0 then begin

value3=(H[Counter]-L)/value2;

end else begin

value3=0;

end;

RW[Counter] = value3;

End;



maxi=0;

For Counter=beg to len begin

if RW[Counter] >= maxi then begin

maxi =RW[Counter];

end;

end;

end;

llrwi=maxi;


------------------------------------------------------------------------


Idicator: Random Walk Index 2 (see image):



Inputs :len(14),beg(10), colorH (cyan), colorL(red);
Vars : RWIHigh(0), RWILow(0);

RWIHigh = hhrwi( len, beg) ;
RWILow = llrwi( len, beg) ;

Plot1( RWIHigh, "RWIH", colorH ) ;
Plot2( RWILow, "RWIL", colorL ) ;


----------------------------------------------------------------------

https://postimg.cc/SJp4np7C

Reply With Quote
Thanked by:
  #19 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


Mucho20 View Post
The code you provided at 10:30 AM works. The one you provided at 2:00 in the afternoon does not. The error message mentioned something about trying to divide by zero. Do you know if the two codes produce the same data?

The 1030 code is wrong the 200 should work but I'm lazy in checking for the divide by zero.


 
Code
Input:
	Length(14);

Vars:
	Loop(1),
	RWIH(0),
	RWIL(0),
	ERW(0);

For Loop = 1 To Length Begin
	ERW = (AvgTrueRange(Loop) * SquareRoot(Loop));
	If (Loop = 1 and ERW <> 0) then begin
		RWIH = (High - Low[1])/ERW;
		RWIL = (High[1] - Low)/ERW;
	End;
	If (Loop = 1 and ERW = 0) then begin
		RWIH = 0;
		RWIL = 0;
	End;
	If (Loop > 1 and ERW <> 0) then begin
		RWIH = maxlist(RWIH, (High - Low[Loop])/ERW);
		RWIL = maxlist(RWIL, (High[Loop] - Low)/ERW);
	End;
	If (Loop > 1 and ERW = 0) then begin
		RWIH = maxlist(RWIH, 0);
		RWIL = maxlist(RWIL, 0);
	End;
End;

Plot1(RWIH , "HRWI") ;
Plot2(RWIL , "LRWI") ;

Plot3(1) ;

Reply With Quote
Thanked by:




Last Updated on May 11, 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