How i can change the number of ticks in the charts according to volatility - futures io
futures io



How i can change the number of ticks in the charts according to volatility


Discussion in EasyLanguage Programming

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




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

How i can change the number of ticks in the charts according to volatility

(login for full post details)
  #1 (permalink)
 ISRA63 
Tel Aviv, Israel
 
Experience: Intermediate
Platform: Sierra Chart
Trading: ES,NQ,STOCKS
 
Posts: 10 since Sep 2014
Thanks: 6 given, 5 received

I am trying to write a strategy in trade station 10.
The strategy is in tick charts.How i can change the number of ticks in the charts according to volatility or time in easy language automatically.( may be using indicator in another chart ?).
Thank You

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Tick Data Group Buy
Emini and Emicro Index
Help with Scale In ATM strategy
NinjaTrader
Simpler Trading - Squeeze Pro indicator
Platforms and Indicators
Multidata
EasyLanguage Programming
Williams Fractal (NT8) indicator - Alert function implem …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
97 thanks
Most Funding Firms are a Scam
65 thanks
Hedging NQ and MNQ 1-10...
13 thanks
Trading Plan
9 thanks
How many day traders are profitable?
8 thanks
 
(login for full post details)
  #2 (permalink)
 Prototyper 
Reno Nevada
 
Experience: Intermediate
Platform: In flux
Trading: in Flux
 
Posts: 35 since Dec 2016
Thanks: 7 given, 31 received

I've had a similar idea so I would like to know as well.

I'm thinking that a second set of calculated bars would need to be plotted. The calculated bars would be generated from the raw data, plus your indicator, generating an artificial bar (but its plotted as an indicator). Signals would still be execute on the raw data bars.

But that's just a guess. I am really just subscribing to your thread.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 ISRA63 
Tel Aviv, Israel
 
Experience: Intermediate
Platform: Sierra Chart
Trading: ES,NQ,STOCKS
 
Posts: 10 since Sep 2014
Thanks: 6 given, 5 received



Prototyper View Post
I've had a similar idea so I would like to know as well.

I'm thinking that a second set of calculated bars would need to be plotted. The calculated bars would be generated from the raw data, plus your indicator, generating an artificial bar (but its plotted as an indicator). Signals would still be execute on the raw data bars.

But that's just a guess. I am really just subscribing to your thread.

Thank you for the reply.
It is good idea.
Please explain how to generate an artificial bar . Do you have code for that ?
Thank you again:

Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 Prototyper 
Reno Nevada
 
Experience: Intermediate
Platform: In flux
Trading: in Flux
 
Posts: 35 since Dec 2016
Thanks: 7 given, 31 received

I have MultiCharts (Easy Language compatible), and it has settings under "Format Instrument" to display data as tick bars, range bars, etc. You must have tick data as the raw source to do this. If your datasource is already time based (like 30 second bars, etc.), you cannot generate time independent bars.

That said, here's an example of "artificial bars". This doesn't solve the problem you posed though. This is just an example. Here, the underlying price data has been "de-trended" by finding the moving average and using that as a zero line for price.

Screenshot shows how to configure the indicators to display as if they are price bars.

VChart_1.pla


Reply With Quote
 
(login for full post details)
  #5 (permalink)
 ISRA63 
Tel Aviv, Israel
 
Experience: Intermediate
Platform: Sierra Chart
Trading: ES,NQ,STOCKS
 
Posts: 10 since Sep 2014
Thanks: 6 given, 5 received


Prototyper View Post
I have MultiCharts (Easy Language compatible), and it has settings under "Format Instrument" to display data as tick bars, range bars, etc. You must have tick data as the raw source to do this. If your datasource is already time based (like 30 second bars, etc.), you cannot generate time independent bars.

That said, here's an example of "artificial bars". This doesn't solve the problem you posed though. This is just an example. Here, the underlying price data has been "de-trended" by finding the moving average and using that as a zero line for price.

Screenshot shows how to configure the indicators to display as if they are price bars.

Attachment 298041

Attachment 298038

Hi,
Thank you for the reply.
The multicharts link
VChart_1 ,I cannot import to Tradestation.
Please advice me how to convert it to Trade station easy language.

Isra63

Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
 Prototyper 
Reno Nevada
 
Experience: Intermediate
Platform: In flux
Trading: in Flux
 
Posts: 35 since Dec 2016
Thanks: 7 given, 31 received

 
Code
{Value Chart Indicator
found on a forum
http://www.traderslaboratory.com/forums/topic/2107-ttmddf-value-chart/}

Inputs:NumBars(5);

Variables:Vopen(0),VHigh(0),VLow(0),VClose(0),Var1(0),Var2(0);

Var: VcloseLam(0),ValueSOB(" "),ValueMOB(" "),ValueMOS(" "), ValueSOS(" "), ValueFair(" "), lastdate(0);

 

 

{Calcualte Value Chart}

VOpen = VChart_1(NumBars,Open);

VHigh = VChart_1(NumBars,High);

VLow = VChart_1(NumBars,Low);

VClose = VChart_1(NumBars,Close);

 

 

If currentbar > Numbars then Begin

Plot1(VOpen,"VOpen");

Plot2(VHigh,"VHigh");

Plot3(VLow,"VLow");

Plot4(VClose,"VClose");

Plot5(8,"8");

Plot6(4,"4");

Plot7(-4,"-4");

Plot8(-8,"-8");

Plot9(0,"0");

End;
 
Code
{Value Chart function
found on a forum
http://www.traderslaboratory.com/forums/topic/2107-ttmddf-value-chart/}

Inputs:NumBars(Numeric),Price(NumericSeries);

 

Variables:VarNumBars(0),Var0(0),LRange(0),YDiv(0),RanVar4(0),VOpen(0),VHigh(0),VLow(0),VClose(0),

VarA(0),VarB(0),VarC(0),VarD(0),VarE(0),VarP(0),VarR1(0),VarR2(0),VarR3(0),VarR4(0),VarR5(0);

 

{Insure NumBars is between 2 and 1000}

If NumBars < 2 then VarNumBars = 2;

If Numbars > 1000 then VarNumBars = 1000;

If Numbars >= 2 and NumBars <=1000 then VarNumBars = NumBars;

 

VarP=Round(VarNumBars/5,0);

 

If VarNumBars >7 then begin

VarA=Highest(H,VarP)-Lowest(L,VarP);

If VarA = 0 and VarP=1 then VarR1=absvalue(C-C[VarP]) Else VarR1 = VarA;

VarB=Highest(H,VarP)[VarP+1]-Lowest(L,VarP)[VarP];

If VarB = 0 and VarP=1 then VarR2=absvalue(C[VarP]-C[VarP*2]) Else VarR2 = VarB;

VarC=Highest(H,VarP)[VarP*2]-Lowest(L,VarP)[VarP*2];

If VarC = 0 and VarP=1 then VarR3=absvalue(C[VarP*2]-C[VarP*3]) Else VarR3 = VarC;

VarD=Highest(H,VarP)[VarP*3]-Lowest(L,VarP)[VarP*3];

If VarD = 0 and VarP=1 then VarR4=absvalue(C[VarP*3]-C[VarP*4]) Else VarR4 = VarD;

VarE=Highest(H,VarP)[VarP*4]-Lowest(L,VarP)[VarP*4];

If VarE = 0 and VarP=1 then VarR5=absvalue(C[VarP*4]-C[VarP*5]) Else VarR5 = VarE;

LRange=((VarR1+VarR2+VarR3+VarR4+VarR5)/5)*.2;

End;

 

 

If VarNumBars <=7 then Begin

If AbsValue(C-C[1]) > (H-L) then Var0=AbsValue(C-C[1]) else var0=(H-L);

If H=L then Var0=absvalue(C-C[1]);

LRange=Average(Var0,5)*.2;

End;

 

If LRange > 0 then begin

If Price = Open then

VChart_1=((Open-Average((H+L)/2,VarNumBars)))/(LRange);

If Price = High then

VChart_1=((High-Average((H+L)/2,VarNumBars)))/(LRange);

If Price = Low then

VChart_1=((Low-Average((H+L)/2,VarNumBars)))/(LRange);

If Price = Close then

VChart_1=((Close-Average((H+L)/2,VarNumBars)))/(LRange);

End;

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 Sandpaddict 
Langley
 
Experience: Intermediate
Platform: Ninjatrader
Broker: IB
Trading: Futures
 
Sandpaddict's Avatar
 
Posts: 643 since Mar 2020


ISRA63 View Post
I am trying to write a strategy in trade station 10.
The strategy is in tick charts.How i can change the number of ticks in the charts according to volatility or time in easy language automatically.( may be using indicator in another chart ?).
Thank You

I have not used Tradestation/easylanguage in a few years but my first thought would be to use switch function or condition to set ticks and some kind of ATR multiplier for volatility. (Coded output of atr indicator times multiplier)

Hopefully that helps, maybe you thought already?

Good luck

Sent using the futures.io mobile app

Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > How i can change the number of ticks in the charts according to volatility


Last Updated on May 18, 2020


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts