Help need for support movingavg - ThinkOrSwim Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim > ThinkOrSwim Programming

Help need for support movingavg
Started:September 21st, 2015 (07:41 PM) by joysync Views / Replies:249 / 2
Last Reply:November 13th, 2015 (10:28 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Help need for support movingavg

Old September 21st, 2015, 07:41 PM   #1 (permalink)
Trading Apprentice
Toronto Canada
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: spy
Posts: 3 since Nov 2014
Thanks: 1 given, 0 received

Help need for support movingavg

Hi ,
I am write a script for finding support moving average just below the Low value. But the simpleMovingavg(close,length) , it need "Length" must be constant.

Is there anybody have a way roundabout it?
below is code. thanks.

def Support = fold Ma=3 to 300 with found = double.nan while isnan(found) do
if between(Low, simpleMovingavg(close,Ma),simpleMovingavg(close,(Ma+1)) )
then Ma else double.nan;

Reply With Quote

Old October 16th, 2015, 06:58 PM   #2 (permalink)
Trading Apprentice
ottawa canada
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: es
Posts: 19 since Oct 2015
Thanks: 0 given, 1 received

As far as I know, the loop function is not very friendly in TOS.
Why don't you try SUM?

Reply With Quote

Old November 13th, 2015, 10:28 AM   #3 (permalink)
Elite Member
Tbilisi + Georgia
Futures Experience: None
Platform: ThinkScript,Tradestation
Favorite Futures: EUR/USD
Posts: 18 since Aug 2014
Thanks: 0 given, 0 received


in FOLD you shouldnt use the function/constant names, but use : GetValue(). I dont know if you will get solution, but at first make corrections...

so,instead of i.e. low[3], in fold, you should use GetValue(low,3)

however, what you are saying, i have no solution. maybe contact
and remember,always share you solutions on web
i.e. post here , or create your own

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > ThinkOrSwim > ThinkOrSwim Programming > Help need for support movingavg

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Support Louis C.K. Big Mike Off-Topic 2 February 1st, 2015 11:36 AM
NT SUPPORT turkmay NinjaTrader 2 March 21st, 2014 12:10 PM
Support and Resistance SpyderTrader NinjaTrader Programming 11 May 13th, 2012 04:24 PM
Support and Resistance tony2009 Traders Hideout 13 July 8th, 2011 06:12 PM

All times are GMT -4. The time now is 08:45 PM.

Copyright © 2016 by 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

Page generated 2016-10-25 in 0.07 seconds with 19 queries on phoenix via your IP