Cannot figure out how enterLong/Short works

Posted By: chirpydog

Cannot figure out how enterLong/Short works - 02/19/15 07:22

Hello, i am immensely interested in this project and developing my own strategies using lite c.

i am testing out my understanding of opening trades using the following codes:

if (priceClosed(0)>buypoint) and (priceLow(0)>buypoint) enterLong(1,buypoint) where buypoint is some 10-20 pips away..

the strategy keeps opening new trades at the next candle...without the tick price at or near buypoint... Can someone enlighten ?

How should i code to know the status of the enterLong ?

Lastly, how and where do i get in touch with service providers who code strategy ?

Many thanks !
Posted By: swingtraderkk

Re: Cannot figure out how enterLong/Short works - 02/19/15 18:38

Have you got set(TICKS); enabled so that trades are evaluated by tick as opposed to the close of the next candle?

also for a buy limit the buyprice must be negative, if positive it is a buy stop.
Posted By: chirpydog

Re: Cannot figure out how enterLong/Short works - 02/20/15 00:30

Thanks swingtraderkk.

i actually put that code in TRADE mode and i thought in that mode trades are run by tick.. anyway i will include the set(TICKS); and test again..

do u mean it should be -buypoint ?
Posted By: swingtraderkk

Re: Cannot figure out how enterLong/Short works - 02/20/15 10:12

Trade mode does run tick by tick.
It is not advisable to run in trade mode before thoroughly testing in test mode.

+ for a stop
- for a limit

Buy Stop = enterLong(0,entry) .... pending buy above price
Buy Limit = enterLong(0,-entry) .... pending buy below price
Sell Stop = enterShort(0,entry) .... pending sell below price
Sell Limit = enterShort(0,-entry) .... pending sell above price

you must use the correct one or risk entering at market
© 2024 lite-C Forums