Jump to content

imfm

Members
  • Posts

    325
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by imfm

    1. Differences in Broker Policies: Different brokers have different policies and risk management strategies. Some brokers might offer lower day trading margins to attract more traders, especially those with smaller account sizes. This can be seen as an advantage for traders who want to maximize their leverage, but it also comes with increased risk.
    2. Risk Management: Brokers like Interactive Brokers might have a more conservative approach to risk management. By requiring a higher margin, they ensure that their clients have a larger buffer against potential losses. This can be beneficial for traders who want a more conservative trading environment.
    3. Different Types of Clients: Some brokers cater more to retail traders, while others might focus on institutional clients or professional traders. The margin requirements can reflect the typical clientele of the broker.
    4. Regulatory Differences: While there are regulatory minimums for margins set by bodies like the CFTC in the U.S., brokers are free to require higher margins if they see fit.
    5. Other Services and Fees: Sometimes, brokers might offer lower margins but might make up for it in other areas, such as higher fees for data, platform usage, or other services.
    6. Liquidity and Funding: Brokers with more liquidity or better funding sources might be able to offer lower margins due to their financial stability.

  1. The reality is that Ninja Trader, sooner or later, had to migrate its platform to a cloud data structure as a form of protection against cracking. In order for developers to continue selling their addons, everything needs to be licensed via server, but above all, the platform itself must carry out three checks: that the platform is attached to a single or multiple trading accounts, then that the addons validate that these services use only this trading account. What does this mean? It will be much more difficult and less profitable to bypass indicators in the long run. That's why it's best to save source codes from old versions and try to build systems collaboratively. However, creators will always charge huge sums of money for something that sometimes is worth nothing
  2. We will have to wait until we can have the 32k version of ChatGPT with update 4.5 for everyone. I have had the opportunity to see a demonstration of that version with the API, and you can input 5000 lines of code and debug them in minutes. However, this requires at least 100 API queries for a few minutes. It can handle code conversion very well, but unfortunately, it is not available ye
  3. While there is no direct, built-in method to relay live data from NinjaTrader 8 (NT8) to NinjaTrader 7 (NT7), you can achieve this using a custom solution. One possible approach involves creating a custom script or tool that connects to the live data feed in NT8, then sends the data to NT7 through a TCP/IP connection or another communication method.

     

    Here are the steps you can follow:

    1. In NT8, create a custom add-on that connects to the live data feed, subscribes to the required instruments, and reads the incoming data.
    2. Establish a TCP/IP server within the add-on, which sends the live data received in NT8 to an external client.
    3. In NT7, create a custom data provider that connects to the TCP/IP server hosted in the NT8 add-on as a client. This custom data provider should receive the data from NT8 and update the charts or strategies in NT7 accordingly.

  4. This indicator is disappointing it doesn't indicate when the price is ranging or choppy, meaning if a Number of lookback bars,

    closes within the high or low range of the previous 5 bars, it doesn't plot the choppy range

    unless im reading this incorrectly

    @imfm can this be improved in the code?

     

    Yes, if you send me all directions and features clearly explained, I can do it.

  5. enjoy! FULL NT8 COMPATIBLE

     

    BAROVERLPA.thumb.jpg.7978e97df300ec8deab3ccdfccce6181.jpg

     

    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.DrawingTools;
    using NinjaTrader.NinjaScript.Indicators;
    using System.Windows.Shapes;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.NinjaScript.DrawingTools;
    #endregion
    
    // This namespace holds all indicators and is required. Do not change it.
    namespace NinjaTrader.NinjaScript.Indicators
    {
    /// <summary>
    /// The bar overlap indicator counts the number of bars that overlap with the current bar's range.
    /// </summary>
    public class BarOverlap : Indicator
    {
    #region Variables
    private int period = 100;
    private double numStdDev = 2.0;
    private Brush baseColor = Brushes.SlateBlue;
    private Brush signalColor = Brushes.Red;
    private int plot0Width = 4;
    private PlotStyle plot0Style = PlotStyle.Bar;
    private DashStyleHelper dash0Style = DashStyleHelper.Solid;
    #endregion
    
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = "The bar overlap indicator counts the number of bars that overlap with the current bar's range.";
    Name = "BarOverlap";
    
    AddPlot(new Stroke(baseColor, plot0Width), plot0Style, "Overlap");
    
    
    IsOverlay = false;
    }
    else if (State == State.DataLoaded)
    {
    // SetPlotAppearance(Plots[0], baseColor, plot0Width, dash0Style);
    }
    }
    
    protected override void OnBarUpdate()
    {
    int n = 0;
    while (n < CurrentBar)
    {
    if (Low[0] >= High[n] || High[0] <= Low[n])
    break;
    n = n + 1;
    }
    Value[0] = n;
    
    if (Value[0] > SMA(Value, period)[0] + numStdDev * StdDev(Value, period)[0])
    PlotBrushes[0][0] = signalColor;
    else
    PlotBrushes[0][0] = baseColor;
    }
    
    private void SetPlotAppearance(Plot plot, Brush brush, int width, DashStyleHelper dashStyle)
    {
    plot.Pen = new Pen(brush, width) { DashStyle = DashStyleHelperToDashStyle(dashStyle) };
    }
    
    private DashStyle DashStyleHelperToDashStyle(DashStyleHelper dashStyleHelper)
    {
    switch (dashStyleHelper)
    {
    case DashStyleHelper.Dash:
    return DashStyles.Dash;
    case DashStyleHelper.DashDot:
    return DashStyles.DashDot;
    case DashStyleHelper.DashDotDot:
    return DashStyles.DashDotDot;
    case DashStyleHelper.Dot:
    return DashStyles.Dot;
    case DashStyleHelper.Solid:
    return DashStyles.Solid;
    default:
    return DashStyles.Solid;
    }
    }
    
    
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
    base.OnRender(chartControl, chartScale);
    Plots[0].Pen = new Pen(baseColor, plot0Width) { DashStyle = DashStyleHelperToDashStyle(dash0Style) };
    }
    
    #region Properties
    [browsable(false)]
    [XmlIgnore()]
    public Series<double> Overlap
    {
    get { return Values[0]; }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "NumStdDev", GroupName = "NinjaScriptParameters", Order = 1)]
    public double NumStdDev
    {
    get { return numStdDev; }
    set { numStdDev = Math.Max(0, value); }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "BaseColor", GroupName = "NinjaScriptParameters", Order = 2)]
    public Brush BaseColor
    {
    get { return baseColor; }
    set { baseColor = value; }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "SignalColor", GroupName = "NinjaScriptParameters", Order = 3)]
    public Brush SignalColor
    {
    get { return signalColor; }
    set { signalColor = value; }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "Plot0Width", GroupName = "NinjaScriptParameters", Order = 4)]
    public int Plot0Width
    {
    get { return plot0Width; }
    set { plot0Width = Math.Max(1, value); }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "Plot0Style", GroupName = "NinjaScriptParameters", Order = 5)]
    public PlotStyle Plot0Style
    {
    get { return plot0Style; }
    set { plot0Style = value; }
    }
    
    [NinjaScriptProperty]
    [Display(Name = "Dash0Style", GroupName = "NinjaScriptParameters", Order = 6)]
    public DashStyleHelper Dash0Style
    {
    get { return dash0Style; }
    set { dash0Style = value; }
    }
    #endregion
    }
    }

×
×
  • Create New...