NexusFi: Find Your Edge


Home Menu

 





multiple tick chart indicator


Discussion in MultiCharts

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




 
Search this Thread
  #1 (permalink)
acdrew0
indianapolis
 
Posts: 15 since May 2010
Thanks Given: 3
Thanks Received: 2

I’m trying to make an indicator that draws from information on 3 different tick chart levels, which I could then use for testing in market replay. I have been experimenting on how to do that in multicharts. Here is the code that I used:

inputs: MALength( 4 );

variables: MA4( 0 ), MA42( 0 ), MA43( 0 );

MA4 = AverageFC( Close, MALength );
MA42 = AverageFC( Close, MALength ) of data2;
MA43 = AverageFC( Close, MALength ) of data3;

If

MA4 > MA4[1] AND
MA42 > MA42[1] AND
MA43 > MA43[1]

then

Plot1(1,"uptrend");


This was applied to a chart with three different tick timeframes of the same symbol and then set on market replay. The results were not what I expected. It seemed to partially work, triggering only sometimes.

I am curious what the problem is. Is this type of code possible to do in multicharts. Or will I need to go about this a different way? Global variables, ADE, etc..?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
2 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

acdrew0,

it's difficult to say what exactly would need to be changed when you say the results where not what you expected. What did you expect it to do or what do you want it to do?
One might see your code and and a corresponding chart and say "it's doing exactly what the code says".

When working with multiple timeframes it's usually best to tie the variables to their respective timeframes, too. I'd also reset the plot when the condition is no longer valid.
Check if the code below does what you have in mind.

Regards,
ABCTG

 
Code
inputs: MALength( 4 );

variables: MA4( 0 ), MA42( 0, Data2 ), MA43( 0, Data3 );

MA4 = AverageFC( Close, MALength );
MA42 = AverageFC( Close, MALength ) of data2;
MA43 = AverageFC( Close, MALength ) of data3;

If

MA4 > MA4[1] AND
MA42 > MA42[1] AND
MA43 > MA43[1]

then

Plot1(1,"uptrend")
else
Plot1(0,"uptrend");


Follow me on X Reply With Quote
  #3 (permalink)
acdrew0
indianapolis
 
Posts: 15 since May 2010
Thanks Given: 3
Thanks Received: 2


Hi ABCTG, Thank you for the response, that helped a lot.

You're right, I should have explained a little more. I was expecting to get the situation in which intratick, when all three moving averages were sloping upwards, the indicator would fire. I was experiencing more of the indicators showing only at the high tick frame end of bar and then sometimes it was not showing up at all when I assumed the conditions were met.

Tying the variable to the timeframe made the indicator behave more like what I was hoping. But, I can't seem to wrap my head around how that makes the calculation different. Do you by chance know why?

I realized that the multiframe tick chart was not able to update tick by tick in market replay. So, i'm not sure if this will be useful for my backtesting, maybe only useable in real time.


Reply With Quote




Last Updated on April 30, 2015


© 2026 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 - Downloads - Top
no new posts