NexusFi: Find Your Edge


Home Menu

 





changing spread value


Discussion in MultiCharts

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




 
Search this Thread

changing spread value

  #1 (permalink)
 
lsubeano's Avatar
 lsubeano 
hollywood
 
Experience: Intermediate
Platform: thinkorswim
Broker: TD
Trading: futures
Posts: 213 since Jun 2010
Thanks Given: 65
Thanks Received: 165

does anyone know how to edit spread values in mc?

I want to be able to change tick value -ie 100*gc-5000*si to get true value spread.

I tried to edit the spread indicator but couldn't figure it out without errors---


danka

Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

danka,

I am not sure if I understand what you are trying to do exactly, can you give an example maybe with a chart and the particular code you were trying to change? I am quite certain there will be ways to accomplish what you have in mind.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
 
lsubeano's Avatar
 lsubeano 
hollywood
 
Experience: Intermediate
Platform: thinkorswim
Broker: TD
Trading: futures
Posts: 213 since Jun 2010
Thanks Given: 65
Thanks Received: 165


i'll attach some pics....


i want tick value to be equal and to be able to change it...so since gold is 100 a point and gold is 5000 a point i multiply 100*gc and 5000*si to get it even....
so i want to be able to change it so if i spread oil and gold....whichever I can change the value of point size in indicator
here's the script of spread indicator:





using System;
using System.Drawing;

namespace PowerLanguage.Indicator
{
public class Spread__Diff : IndicatorObject
{
private IPlotObject Plot1;

public Spread__Diff(object ctx) :
base(ctx) {}

private ISeries<double> dataseries1 { get; set; }

private ISeries<double> dataseries2 { get; set; }

protected override void Create(){
Plot1 =
AddPlot(new PlotAttributes("SprdDiff", 0, Color.Blue,
Color.Empty, 0, 0, true));
}

protected override void StartCalc(){
dataseries1 = Bars.Close;
dataseries2 = BarsOfData(2).Close;
}


protected override void CalcBar(){
Plot1.Set(0, (dataseries1[0] - dataseries2[0]));
}
}
}



thanks!

Attached Thumbnails
Click image for larger version

Name:	gc-si.png
Views:	158
Size:	18.2 KB
ID:	210052   Click image for larger version

Name:	gc-simc.png
Views:	162
Size:	47.1 KB
ID:	210053  
Follow me on Twitter Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

lsubeano,

it sounds like you just need to multiply the prices that build the spread with their respective point values. Modifying the line of the original code that sets the plot value with the line below would do that:

 
Code
            Plot1.Set(0, ((dataseries1[0] * Bars.Info.BigPointValue) - (dataseries2[0] * BarsOfData(2).Info.BigPointValue)));
Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on June 10, 2016


© 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