NexusFi: Find Your Edge


Home Menu

 





Help on studies


Discussion in Sierra Chart

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




 
Search this Thread

Help on studies

  #1 (permalink)
 surfeur 
France
 
Experience: Advanced
Platform: R
Trading: Forex
Posts: 24 since Oct 2013
Thanks Given: 3
Thanks Received: 11

Hi guys,

I need some help about write a study in Sierra Chart.

I have this code :

#include "sierrachart.h"
SCDLLName("ReadFile_Study")
SCSFExport scsf_ReadFile(SCStudyInterfaceRef sc){
SCString DebugMessage;
SCInputRef FullPath = sc.Input[0];
if (sc.SetDefaults){
sc.GraphName = "ReadFile_Study";
sc.AutoLoop = 0;
FullPath.Name = "Full Path to Text File";
FullPath.SetPathAndFileName("");
return;
}

std::ifstream input(FullPath.GetPathAndFileName());
for( std::string line; getline(input,line); ){
DebugMessage.Format( "line : %s", line.c_str() );
sc.AddMessageToLog( DebugMessage, 0 );
}
}

The first step is done ! Read a csv file.

The second step it's draw a line in SC of this data.

my file is by example

0
0
0
1
0
0
1

etc etc.

Someone can help me to write the second step please ?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
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
The Program
18 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358

You should upload the file you are trying to read and plot. Because it looks like there is no index or time stamp so what will that relate to on the chart?

Follow me on Twitter Reply With Quote
  #3 (permalink)
 surfeur 
France
 
Experience: Advanced
Platform: R
Trading: Forex
Posts: 24 since Oct 2013
Thanks Given: 3
Thanks Received: 11



Trembling Hand View Post
You should upload the file you are trying to read and plot. Because it looks like there is no index or time stamp so what will that relate to on the chart?

Hi,

What do you mean by "You should upload the file you are trying to read and plot." ?

I have control over the input file so I can add an index (value or Date)

I just try to plot in subgraph my indicator (0/1)

Started this thread Reply With Quote
  #4 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358


surfeur View Post
Hi,

What do you mean by "You should upload the file you are trying to read and plot." ?

I have control over the input file so I can add an index (value or Date)

I just try to plot in subgraph my indicator (0/1)

Ok but how are you going to match it to the bars in the chart?

Follow me on Twitter Reply With Quote
  #5 (permalink)
 surfeur 
France
 
Experience: Advanced
Platform: R
Trading: Forex
Posts: 24 since Oct 2013
Thanks Given: 3
Thanks Received: 11


Trembling Hand View Post
Ok but how are you going to match it to the bars in the chart?

Each line in my file corresponds to a bar in my graph.

Started this thread Reply With Quote
  #6 (permalink)
 Trembling Hand 
Melbourne, Land of Oz
 
Experience: Advanced
Platform: Sierra Chart, CQG
Broker: CQG
Trading: HSI
Posts: 246 since Jun 2011
Thanks Given: 28
Thanks Received: 358


surfeur View Post
Each line in my file corresponds to a bar in my graph.

Geez your not giving much detail to make it easy to help. What I'm asking is if you have a file with 100 different values (1s and 0s) and want to apply it to a chart, say for example a 1 min chart, and that chart has 500 bars how are you going to align the data?

Follow me on Twitter Reply With Quote




Last Updated on January 21, 2021


© 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