Strategy that sends an order at the moment a List indicates - futures io
futures io futures trading



Strategy that sends an order at the moment a List indicates


Discussion in MultiCharts

Updated by Maikel
    1. trending_up 415 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 replies
    2. attach_file 4 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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
 

Strategy that sends an order at the moment a List indicates

(login for full post details)
  #1 (permalink)
Madrid
 
 
Posts: 7 since Jan 2018
Thanks: 0 given, 0 received

Hello, my name is Maikel, my level of Multicharts.Net is not yet very high,

I have the following problem that I have been trying to solve for weeks.

The only objective of the signal algorithm that I intend to do is to open orders at the exact time instant that a TimeTime List indicates, perhaps someone will find a better and easier way.

I think it's very interesting because what I want to do is to send orders that are previously written in a Global Static List,
in the script that I attach the orders are directly written from the script itself, but in the future I want to do it from an
indicator, I think it will be very useful in order to opening operations from an indicator, sending it before to a signal script.

The script is already working, almost properly, the only problem it has if that the operations are opened a candle before the right candle. I do not know why. In the script I draw an arrow object with the same logic that the ordersm and those arrows do are right positioned in the right candle.

Resuming, What I am doing is basically this (the full script is attached):
---------------------------------------------------------------------------------------------------------------------------------------

//Here I put the Date Time instant orders in Globals.OrdList List
Globals.OrdList.Add(new Orden()
{
DatTim = Convert.ToDateTime("19/01/2018 11:10:00"),
LargCort = "Long"
});


//Here I copy the orders from Globals.OrdList List to OrdImport List
while ((p < Globals.OrdList.Count) & (Globals.OrdList.Count > 0))
{
OrdImport.Add(new OrdenImp()
{
DatTim = Globals.OrdList[p].DatTim,
LargCort = Globals.OrdList[p].LargCort
});
p = p + 1;
}


if (StrategyInfo.MarketPosition == 0) //IF WE DO NOT HAVE ANY OPERATION OPENED (IT IS ALWAYS CERO, I DO NOT KNOW WHY)
{


if (LargCortAux == "Long")
{
Output.WriteLine("Long en Bars.CurrentBar: {0} - DateTime: {1} - Price: {2:.00}",Bars.CurrentBar,BarsOfData(1).Time[0],BarsOfData(1).Close[0]);

BuyOrder.Send();

LargCortAux = "nothing";


//-DRAW ARROW ------------------------
IArrowObject arrowData1 = DrwArrow.Create(
new ChartPoint(Bars.CurrentBar + 1, BarsOfData(2).Close[0]), false);
arrowData1.Size = 25;
//----------------------------------------

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


I use 15m timeframe for the main chart, and 1tick data sub chart (hiden).

It is necesary to add Globals. And compile all (ctrl +F7).

The result of one example operation is in an image attached.

As I said at the beginning, the only objective of the signal algorithm that I intend to do is to open orders at the exact time instant that a TimeTime List indicates, maybe someone will get a better and easier way.



WSSignal.wsp

Globals.cs

Signal.cs

Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > Strategy that sends an order at the moment a List indicates


February 3, 2018


Upcoming Webinars and Events
 

Dealing with burnout w/Linda Bradford Raschke

Elite only
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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