futures io



CAM indicator to be corrected


Discussion in EasyLanguage Programming

Updated
    1. trending_up 223 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 1 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
 

CAM indicator to be corrected

(login for full post details)
  #1 (permalink)
Shaban
Turin + Italy
 
 
Posts: 188 since Feb 2020
Thanks: 24 given, 117 received

Hi,

here is the CAM indicator formula (for Tradestation and other software):

https://traders.com/Documentation/FEEDbk_docs/2018/01/TradersTips.html

but checking the formula, Tradestation 8 reports this error: "Arithmetic (numeric) expression expected here" in the word: not (see in the image, the red arrow in the word: not):

https://postimg.cc/Fd7wZh0K

if someone can correct the code, I thank you in advance; the formula is this:

---------------------------------------------------------------------------------------------


// The CAM Indicator

// Barbara Star, PhD. - TASC JAN 2018

inputs:
ADXLength( 10 ),
MACDFastLength( 12 ),
MACDSlowLength( 26 ),
CAMUPColor( Green ),
CAMDNColor( Red ),
CAMPBColor( Yellow ),
CAMCTColor( Blue ) ;

variables:
MACDValue( 0 ),
ADXValue( 0 ),
PlotColor( 0 ),
MACDRising( false ),
ADXRising( false ),
intrabarpersist InAChart( false ),
PatternLabel( "" ) ;

once
begin
InAChart = GetAppInfo( aiApplicationType ) = cChart ;
end ;

MACDValue = MACD( Close, MACDFastLength,
MACDSlowLength ) ;
ADXValue = ADX( ADXLength ) ;

MACDRising = MACDValue > MACDValue[1] ;
ADXRising = ADXValue > ADXValue[1] ;

if ADXRising and MACDRising then
begin
PlotColor = CAMUPColor ;
PatternLabel = "CAM UP" ;
end
else if not ADXRising and not MACDRising then
begin
PlotColor = CAMPBColor ;
PatternLabel = "CAM PB" ;
end
else if ADXRising and not MACDRising then
begin
PlotColor = CAMDNColor ;
PatternLabel = "CAM DN" ;
end
else if not ADXRising and MACDRising then
begin
PlotColor = CAMCTColor ;
PatternLabel = "CAM CT" ;
End ;

// Format plot style as follows:
// Plot1 Bar High
// Plot2 Bar Low
// Plot3 Left Tic
// Plot4 Right Tic
Plot1( High, "CAMH", PlotColor ) ;
Plot2( Low, "CAML", PlotColor ) ;
Plot3( Open, "CAMO", PlotColor ) ;
Plot4( Close, "CAMC", PlotColor ) ;

// Show current state in RadarScreen
If not InAChart then
Plot5( PatternLabel, "CAM", PlotColor )

-------------------------------------------------------------------------

Reply With Quote

Can you help answer these questions
from other members on futures io?
Rival systems and Exegy
Platforms and Indicators
New subforum for Generative AI and LLM
Elite Generative AI / LLM Trading
Freelancer to build an Apps to Control TradeStation (TS) …
TradeStation
Need a bit of help putting pieces together :)
Traders Hideout
Tickeron
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Big Mike in Ecuador
42 thanks
top trading courses
13 thanks
Trader Sentiment Tool for our community
11 thanks
futures io site changelog and issues/problem reporting
11 thanks
Hedge your losers to turn them into winners
10 thanks

 
(login for full post details)
  #2 (permalink)
Doob
Seattle,Washington,USA
 
 
Posts: 5 since Nov 2011
Thanks: 0 given, 3 received

At the very bottom - last 2 lines of code - try this: I added a Semicolon and a Double forward slash - and it Compiles


Plot5( PatternLabel, "CAM", PlotColor );

//-------------------------------------------------------------------------



By the way - I haven't used Tradestation for many years now - I modified your code in Multicharts.

I haven't done much on FuturesIO for a long time now - was going to add at picture - but it didn't work for me - much different from Elitetrader.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 3,540 since Jul 2012
Thanks: 1,846 given, 7,108 received


TS 8 doesn't like "If Not" - that capability was added in TS 9 or 10, I think.

so take the logic and rearrange the expression to eliminate the "if Not" statements and it will work.

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
(login for full post details)
  #4 (permalink)
Shaban
Turin + Italy
 
 
Posts: 188 since Feb 2020
Thanks: 24 given, 117 received


Doob View Post
At the very bottom - last 2 lines of code - try this: I added a Semicolon and a Double forward slash - and it Compiles


Plot5( PatternLabel, "CAM", PlotColor );

//-------------------------------------------------------------------------



By the way - I haven't used Tradestation for many years now - I modified your code in Multicharts.

I haven't done much on FuturesIO for a long time now - was going to add at picture - but it didn't work for me - much different from Elitetrader.

To insert attachments and images, there are 2 methods:



or easier: after clicking on the button: Post Reply, click on the words on the left: "Paste images" (blue background), see image:

Attached Thumbnails
Click image for larger version

Name:	Future.io to insert images.jpg
Views:	10
Size:	87.4 KB
ID:	331740  
Reply With Quote
The following user says Thank You to Shaban for this post:


futures io Trading Community Platforms and Indicators EasyLanguage Programming > CAM indicator to be corrected


Last Updated on May 15, 2023



Copyright © 2023 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