NexusFi: Find Your Edge


Home Menu

 





Coding Multicharts Ticki for OMX (stockholm) futures


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one ABCTG with 7 posts (1 thanks)
    2. looks_two stefanols with 6 posts (0 thanks)
    3. looks_3 trader201 with 1 posts (0 thanks)
    4. looks_4 Granit with 1 posts (0 thanks)
    1. trending_up 3,562 views
    2. thumb_up 1 thanks given
    3. group 5 followers
    1. forum 14 posts
    2. attach_file 4 attachments




 
Search this Thread

Coding Multicharts Ticki for OMX (stockholm) futures

  #1 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi,
I am trying to do a ticki indicator but for Swedish stocks and futures.
Hope that someone can see where I am doing wrong.

Thanks in advance. BR Stefan


 
Code
Input: NumberInstruments(47);

Vars: Datacounter(0);
Vars: Newuptick (0);
Vars: NewupTickAgg (0);
Vars: NewdownTick (0);
Vars: NewdownTickAgg (0);
Vars: Uptickcount (0);
Vars: downtickcount (0);
//Vars: intrabarpersist Uptick (0);
//Vars: intrabarpersist Downtick (0);


//reset variables
NewupTick =0;
NewupTickAgg =0;
NewdownTick =0;
NewdownTickAgg =0;

For datacounter = 2 to Numberinstruments begin
if close > close[ 1 ] of data(datacounter) then UpTickCount = upTickCount[ 1 ] + 1;

if close < close[ 1 ] of data(datacounter) then downtickcount = downtickcount[1] + 1;

end;

//UpTickCount = (NewupTick /(Numberinstruments-1)) * 100;
//Downtickcount = (NewdownTick/(Numberinstruments-1)) * 100;

Value1 = UpTickCount-Downtickcount;
Plot1(value1,"");

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Deepmoney LLM
Elite Quantitative GenAI/LLM
 
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
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Stefan,

depending on your timeframe you might want to consider using intrabarpersist variables.

One thing that I don't think you intend to do is checking the Close of Data 1 against your other datastreams, which
the below lines do.

 
Code
if close > close[ 1 ] of data(datacounter) then UpTickCount = upTickCount[ 1 ] + 1;

if close < close[ 1 ] of data(datacounter) then downtickcount = downtickcount[1] + 1;
I suppose it should be
 
Code
if close of data(datacounter) > close[ 1 ] of data(datacounter) then UpTickCount = upTickCount[ 1 ] + 1;

if close of data(datacounter) < close[ 1 ] of data(datacounter) then downtickcount = downtickcount[1] + 1;
Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5


Hi,

Thanks for your input.

I have added that and the barstatus but it is sill not showing what I want.

The result should be in the range plus 47 to minus 47 but it is often below 1000.

Any chance that someone can see what is wrong.

Thanks in advance and BR Stefan





 
Code
[Ticki indicator for Swedish index OMXS30 with 47 of the most important stocks. Shows net stocks on an uptick (+47 to -47. Should mirror ticki for NYSE] 

Input: NumberInstruments(47); //number of instruments

Vars: Datacounter(0);
Vars: Newuptick (0);
Vars: NewdownTick (0);
Vars: Uptickcount (0);
Vars: downtickcount (0);
Vars: Tickcount (0);



//reset variables, resets the number of stocks on an uptick for it´s time frame. 
NewupTick = 0;
NewdownTick = 0;
Tickcount = 0;
Uptickcount = 0;
downtickcount = 0;


For datacounter = 2 to Numberinstruments begin

if barstatus (datacounter) =2 then begin {tick close}


if close of data(datacounter) > close[ 1 ] of data(datacounter) then newupTick = newUptick[1] + 1;

if Close of data(datacounter) < close[ 1 ] of data(datacounter) then newdowntick = newdowntick[1] + 1;

//if (barstatus(datacounter) = 2)  and close of data(datacounter) > close[ 1 ] of data(datacounter) then newupTick = newUptick[1] + 1;

//if (barstatus(datacounter) = 2) and close of data(datacounter) < close[ 1 ] of data(datacounter) and (barstatus(datacounter) = 2) then newdowntick = newdowntick[1] + 1;

end;
end;

Uptickcount = newuptick;
downtickcount = newdowntick;

//Plot1(uptickcount-downtickcount,"Uptickcount-downtickcount");

Plot1 (uptickcount,"upticks");
PLot2 (downtickcount,"downticks");

Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Stefan,

when coming across situations that are not clear or hard to explain, it is usually a good idea to add print statements to the code to shed some light on what is going on.

I would strongly suggest to start properly commenting your code. Not only because it makes it easier to help tracking down issues when the intention of a code snippet is clear, but it will save you a lot of time in the long run. Imagine you come back to a code you wrote a few month or years ago. Without having comments to guide you through your intentions, you will spend a lot of time thinking yourself back into the code.

Regarding your issue, let's assume newUpTick = 10 at the end of this bar. Even though you set newUpTick to 0 on the next code execution, what will newupTick be at the end of the next bar (assuming just one data stream fulfilled your codition of close > close[1])?
Is this what you want? If not, what do you want to show instead?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #5 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi,

Thanks again. Really appreciate it.

I have added some explanation.

As you say if a certain time frame e.g. 3 min at the end of the bar has accumulated 30 stocks on an uptick and 17 on downtick out of the total 47 data streams and stocks it should show 10. For next bar it should start with value 10 and add and subtract to this number.

Preferable shown as a candle stock e.g. open 10, high 15, low 2 and close 13.

Is this possible?

Hope you understand me better now and thanks in advance.

Best regards

Stefan

Started this thread Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Stefan,

let's go over this again, as I am trying to get you to see what is going on in your code.

Let's assume newUpTick = 10 at the end of this bar.

What will newupTick be at the end of the next bar assuming just one data stream fulfilled your condition of close > close[1]?

Or in other words will it be +1 or something else?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #7 (permalink)
trader201
Queens New York
 
Posts: 1 since Jun 2016
Thanks Given: 0
Thanks Received: 0

hi to all.. i will like to know if someone can help me to create an email and text alert on thinkorswim, i will like to create the alert on Parabolic Sar. i will like to create the Parabolic Sar alert on 1 Hours charts on the Futures. thanks to all..

Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

trader201,

I am sure someone is able and willing to help you, but I am afraid they might miss your post as it's not in the correct section of the forum and within an unrelated topic. Therefore you might have better chances getting help if you create your own thread or post in the ThinkOrSwim section of the forum.

Regards,

ABCTG


trader201 View Post
hi to all.. i will like to know if someone can help me to create an email and text alert on thinkorswim, i will like to create the alert on Parabolic Sar. i will like to create the Parabolic Sar alert on 1 Hours charts on the Futures. thanks to all..


Follow me on Twitter Reply With Quote
  #9 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi,

If it is possible to have it like a candlestick then it would be natural it opens at 10

O =10
H e.g 13
L e.g. 8
C =11

If not possible I would be happy that is shows 1 and previous result 10.

Enclose an image of esignal ticki feed. Understand that this is an instrument and not
an indicator that I am trying to create.

Best regards

Stefan

Started this thread Reply With Quote
  #10 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


Stefan,

that would be the final step, but one thing at a time. Let's make the first step by answering my two questions from the previous post. I don't mean how you want it to look, but
using the example I gave you and thinking about what your code would return as a value given the example.
This might help you understand where it goes wrong, which is the first step towards fixing the issue and getting the final result.

Regards,

ABCTG


stefanols View Post
Hi,

If it is possible to have it like a candlestick then it would be natural it opens at 10

O =10
H e.g 13
L e.g. 8
C =11

If not possible I would be happy that is shows 1 and previous result 10.

Enclose an image of esignal ticki feed. Understand that this is an instrument and not
an indicator that I am trying to create.

Best regards

Stefan


Follow me on Twitter Reply With Quote




Last Updated on April 14, 2019


© 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