|
Auto order setup |
talgoren
|
Post subject: Auto order setup |
Post rating: 0
|
Posted: Wed 04 Jun, 2014, 23:43
|
|
User rating: 0
Joined: Sat 17 May, 2014, 22:00 Posts: 2
|
Hi I'm trying to build some kind of semi-auto strategy that works only once. the idea is that it sets up the order details- entry,SL and TP. i want to trade using price action and after a bullish/bearish candle i would like to press play and that all the calculations will be set. the first part is recognizing if to buy or sell (by identifying the EMA's values) than the calculation is based on the previous candle high and low. and now the problems: 1 it keeps opening orders and adding positions even after i limited the positions to 1 (on the very first block) 2 it doesnt set the entry (when selling) on the last candle low 3 i did a calculation of the difference between the previous candle high and low but i can use the value in my TP (because it is not integer ) is there a different way to do it?
hope i was clear
thanks
Tal
Attachments: |
Trendflowauto.vfs [43.36 KiB]
Downloaded 101 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Auto order setup |
Post rating: 0
|
Posted: Thu 05 Jun, 2014, 03:23
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
I noticed couple of remarks related to your strategy:
- All blocks should be connected otherwise separated blocks will not be considered within the code. - IF you need to use specific TP price in your Pending Open block, you need to expand the settings in the bottom of this block and set the variable as Price (Double) rather than pips (Integer) - Can you please elaborate on your use of both BID and ASK historical candle block ? Is there a reason behind this ? (A long position could be triggered on BID data but the execution will be for sure on the ASK price)
The answers to your questions: 1/ You did not set properly your IF block that handles orders number, please check the attached file. 2/ From your calculation, it appears that your entry price 'SellEntry' is the price that should be used, if this is correct, then simply drag and drop it in the Pending block. Generally speaking, the Last candle Low price couldn't be know till the candle is completely formed, thereforre it is not possible to trade on it and to do so you should use Get historical candle instead. 3/ Please check my upper remarks (2nd bullet point)
I've built the SHORT side of your strategy, feel free to replicate for the LONG side if the result cope with your expectations.
Thanks
Attachments: |
Trendflowauto_updated.vfs [42.72 KiB]
Downloaded 117 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
talgoren
|
Post subject: Re: Auto order setup |
Post rating: 0
|
Posted: Thu 05 Jun, 2014, 21:34
|
|
User rating: 0
Joined: Sat 17 May, 2014, 22:00 Posts: 2
|
Thanks alot for the help
my bid and ask historical candles gives me my risk calculation. that way i know how many pips i have until i want to take my profit in case the order is triggered. this is why i want to convert it to pips. but i guess i can do it with the calculation expression and than placing it in the TP price.
" From your calculation, it appears that your entry price 'SellEntry' is the price that should be used, if this is correct, then simply drag and drop it in the Pending block. '' ... the price entry on the "sell candle'' doesn't seem to work (i have tried to do another simple strategy that only buys and couldn't get it to work ) i think it buys on the last candle close
''Generally speaking, the Last candle Low price couldn't be know till the candle is completely formed, thereforre it is not possible to trade on it and to do so you should use Get historical candle instead.'' i don't understand because the value of the candle low comes from the historical candle block..
thanks
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Auto order setup |
Post rating: 0
|
Posted: Fri 06 Jun, 2014, 13:48
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Understood, for the risk calculation you can use the BID and ASK sides and the difference *10'000 will be in pips but in your strategy there is no linked calculation blocks that manage risk as you previously said: make sure your calculation is correct and linked to the whole strategy and dont hesitate to reach out if you need any assistance. For your Sell limit entry price, there is a trading rule that you should consider: A sell limit order can be submitted at a price that should be above or equal the market price: if you place a sell limit at the candle low-1pip and this price is lower than the market price, then you'll be automatically executed at the current market price. Please adjust your calculations with regards to the limit order side.
Finally, my quote ''Generally speaking, the Last candle Low price couldn't be know till the candle is completely formed, thereforre it is not possible to trade on it and to do so you should use Get historical candle instead.'' is about a general process of programming (whatever the programming language used with Dukascopy) If you're using historical candle then all should be fine.
Cheers
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|