Scalping code help

Forums ProRealTime English forum ProOrder support Scalping code help

Viewing 6 posts - 1 through 6 (of 6 total)
  • #12130

    Hi guys.

    I was attending this webinar that explained a scalping method I’d like to code. It was on FTSE 100, 5 min chart. The idea was to find the ATR from a specific rule set.

    the ruleset was to ignore the first and last two candle on a trading day between 08:00 and 16:30  on a 45 days basis. to make it easy it would yield 5.5 points (we can always try and code this later)

    To make a long trade, you should look for a bullish candle with no or almost no shadow 2×5.5=11 points and enter the trade there.

    Take profit would be around 5 but if the priceaction crosses under the low from the condition candle- then exit the trade

    Since this can easily be under 10 we cannot use stop loss, as IG would only allow >=10 as stop loss.

    But I cannot get the code to work with this exit- please help 🙂

    cheers Kasper

     

    #12144

    I’d say that’s because once your code has bought one contract, at next candle you don’t enter anymore inside the “if not longonmarket and…” if statement, because you’re long now… So the “if low crosses under bulllow…” if statement is not visited during subsequent candles, you need to get it out of the “if not longonmarket”, something like:

    Also, Nicolas wrote interesting stuff about pending orders, but I can’t remember if I saw it as a forum response or a blog article, maybe you could use this type of order instead for your exit under bulllow.

    That’s the doc: http://www.prorealcode.com/documentation/stop-pending/

    So maybe a “sell 1 contract at bullow stop” order? Keeping in mind it has to be coded in such a way that the order is re-placed at each new candle (so careful with fancy if statement conditions that could sometimes place it and sometimes not while you’d still want it there at each bar you’re still long).

    #12145

    Hi Noobywan and thanks for your reply. Unfortunate I started out with your suggestion but with no different. Maybe we need ver 10.3 so that we can test for the exit on a 1 min chart. Perhaps this is the reason it will never hit as it’s the same cycle. Maybe It will never cross over in the same candle, but just be over. Pending orders I think will have the same problem with distance, at least on IG. I saw many time that the entry was to close to the price so the order was rejected.

    #12147

    Your problem is that the actual low can’t cross its own value and that’s you are testing at line 20.

    #12150

    Nicolas has the sharpest eye!

    #12227

    Yes he has:-) and it working with your code, however it’s not a good strategy. Progressing the strategy I found out if I use a “set stop loss 2” the code will work if slightly changes, however IG does not allow small STOP contracts, so is there a way around? I want to save the number from the entry point, the “CONTRACT AT MARKET” price and test on it later. something like this, however it not working: Basically  I’m looking for at way to code a SL at 2 without using the SET STOP LOSS 2. can it be done, or perhaps on multiple timeframes in ver 10.3?

     

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login