Page 2 of 8

Re: Trading_commands

PostPosted: Mon Jul 17, 2017 7:20 pm
by 7000306337
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 ?

Re: Trading_commands

PostPosted: Mon Jul 17, 2017 7:59 pm
by 7000306337
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.

Re: Trading_commands

PostPosted: Tue Jul 18, 2017 12:11 am
by 7000306337
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.

Re: Trading_commands

PostPosted: Tue Jul 18, 2017 11:13 am
by 7000306337
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?????

Re: Trading_commands

PostPosted: Tue Jul 18, 2017 12:08 pm
by Apprentice
That was true once.
Trade from within indicator was introduced later.
Strategies still have some advantages, like, trade simulation.

Re: Trading_commands

PostPosted: Sat Jul 22, 2017 11:52 am
by 7000306337
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,

Re: Trading_commands

PostPosted: Mon Jul 24, 2017 8:24 am
by Apprentice
You will add different values, depending on the trading command that you will use.
http://www.fxcodebase.com/documents/Ind ... mands.html

Re: Trading_commands

PostPosted: Mon Jul 24, 2017 8:47 am
by 7000306337
Greater Than Life Apprentice:

Exactly what I was looking for.

Thank you very much,

Re: Trading_commands

PostPosted: Mon Jul 24, 2017 2:31 pm
by Paul W
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\

Re: Trading_commands

PostPosted: Tue Jul 25, 2017 8:55 am
by Apprentice
Works perfectly on my non FIFO account.
Do you use FIFO?