NexusFi: Find Your Edge


Home Menu

 





multiple tick chart indicator


Discussion in MultiCharts

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




 
Search this Thread

multiple tick chart indicator

  #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?
Exit Strategy
NinjaTrader
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
18 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter 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


© 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