| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Help Coding with iCustom(PinBar) https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5390 |
Page 2 of 2 |
| Author: | fx800 [ Sun Feb 11, 2018 1:49 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
Thank you again Steve. Will try as you have suggested and will post again afterwards. Waiting for market to open and see if the ea will send any trade. peter |
|
| Author: | fx800 [ Sun Feb 11, 2018 2:16 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
In the chart shown, there was a down pin bar 4 candles back. The ALERT returns a value of 1.3833 which is exactly the same figure in the DATA WINDOW for PB DOWN when I pointed the cursor on the same candle. I have assigned a value of 0 to static datetime OldPBBarTime as suggested. Waiting for market to open. |
|
| Author: | fx800 [ Sun Feb 11, 2018 3:54 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
If the code for pin bar does work, then I would like to test whether trading a pin bar bouncing off a pivot would be profitable or not as shown in the examples. The code snippets for NextSupport/NextResistance has been borrowed from the Pinoccio ea. P.S. LibSSSRv2 replaced by latest version LibSSSRv4 |
|
| Author: | fx800 [ Mon Feb 12, 2018 11:13 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
Thank you Steve for your help with coding the indi. The amended code worked when I substituted the pin bar code in your Pinoccio ea with it. For some reason the ea I posted still has not sent any trades. I will continue to investigate and report back if I find the answer. :hi: :hi: :hi: |
|
| Author: | SteveHopwood [ Mon Feb 12, 2018 11:49 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
I knew I had coded pinbar code somewhere, but buggered if I could remember where. The first thingy I do in this sort of situation is check that void LookForTradingOpportunities() is being called. I use this code to see whether some point in my code is actually being reached, so here it goes at the top of void LookForTradingOpportunities() : Alert("Y"); It doesn't matter what the alert shows; you just need it to be happening. Once I know that the function is being called, I move the Alert("Y"); thingy to wherever I think the code should be reaching. Suppose the function is being called but there is no trade signal identified in your code? Adopt the same principle. Go to line 2942 in the file you presented here and add some code along these lines: if (BuySignal) Alert(Symbol(), " Buy signal found"); if (SellSignal) Alert(Symbol(), " Sell signal found"); etc Then, if you know that your EA should have generated a signal but hasn't thrown an Alert, there is something wrong with your trade signal detection code. This is how I spend vast chunks of my life. There are probably better ways of doing this known to the Proper Coders here. I am describing what I do. |
|
| Author: | fx800 [ Mon Feb 12, 2018 11:52 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
Thank you again Steve. Will work on it and report back if I find the answer. |
|
| Author: | SteveHopwood [ Mon Feb 12, 2018 11:54 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
I have edited my post. Good luck. You will feel fantastic when you find the solution. |
|
| Author: | fx800 [ Mon Feb 12, 2018 11:56 pm ] |
| Post subject: | Help Coding with iCustom(PinBar) |
Thanks again. |
|
| All times are UTC | Page 2 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|