Trading_commands

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: Trading_commands

Postby 7000306337 » Mon Jul 17, 2017 7:20 pm

Can`t thank you enough. Awesome!

Would it be too much to ask of you to add a new command to use OpenMarket() to open a new position if CURRENTLY NO TRADES EXIST ?
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby 7000306337 » Mon Jul 17, 2017 7:59 pm

Apologize.

I did NOT mean to say a new "addCcommand".

I actually meant to say ONLY MODIFY OpenMarket() to open a new position if no positions already exist.
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby 7000306337 » Tue Jul 18, 2017 12:11 am

I do NOT want to abuse your generosity.

Please disregard, my last request (to modify OpenMarket()).
I should try to do it myself.
I will ask for help, if I get stuck.
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby 7000306337 » Tue Jul 18, 2017 11:13 am

APPRENTICE ...... YOU ARE AMAZING !!!!!!! AWESOME !!!!!

YES ... trading can be done from INDICATORS.
For proof of concept, ... I just hard coded OpenMarket() and it DID OpenMarket("B") on crossingAbove and OpenMarket("S") on crossingBelow the trend line.

INCREDIBLE ... HARD TO BELIEVE.

Why for so many years INDICORE SDK got me confused under the impression that "STRATEGIES/ALERTS" and "INDICATORS" are 2 different separate animals (you can NOT do in one what is done in the other)?????

Why did INDICORE SDK create the distinction, .... if I can do everything I want in an INDICATOR?????
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby Apprentice » Tue Jul 18, 2017 12:08 pm

That was true once.
Trade from within indicator was introduced later.
Strategies still have some advantages, like, trade simulation.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17510
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Trading_commands

Postby 7000306337 » Sat Jul 22, 2017 11:52 am

Hi Greatest Apprentice:

Very much appreciate if can give me a link to a complete documentation of core.valuemap.

In the SDK, I couldn`t find any meaningful complete description of all attributes of valuemap, and ENUMERATED lists of their respective values

local valuemap = core.valuemap();
valuemap.Command = "CreateOrder", ?????
valuemap.OrderType = "OM", "CM", ?????
valuemap.OfferID = offer_id;
valuemap.AcctID = account_id;
valuemap.Quantity = amount;
valuemap.BuySell = "B", "S", ??????
valuemap.NetQtyFlag = "y", ??????
valuemap.?????? = ???????
????????

txs,
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby Apprentice » Mon Jul 24, 2017 8:24 am

You will add different values, depending on the trading command that you will use.
http://www.fxcodebase.com/documents/Ind ... mands.html
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17510
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Trading_commands

Postby 7000306337 » Mon Jul 24, 2017 8:47 am

Greater Than Life Apprentice:

Exactly what I was looking for.

Thank you very much,
7000306337
 
Posts: 16
Joined: Sat Jul 15, 2017 9:48 am

Re: Trading_commands

Postby Paul W » Mon Jul 24, 2017 2:31 pm

Handy function

been testing, found some errors
- Close all trades - OK
- Hedge your Position - not working
- Reverse your Position - will close existing trade, does not open new reverse position
- Close 1/2 of your Position - not working

amount size tested = 10
am using TSII - current Version 01.15.090518

if you could have a look - would be very much appreciated\
Attachments
trade commands error.PNG
Paul W
 
Posts: 84
Joined: Mon Apr 01, 2013 1:36 pm

Re: Trading_commands

Postby Apprentice » Tue Jul 25, 2017 8:55 am

Works perfectly on my non FIFO account.
Do you use FIFO?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 17510
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext

Return to Custom Indicators

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 15 guests